gnu: Add PadWalker.
[jackhill/guix/guix.git] / gnu / packages / multiprecision.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
704197f4 2;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
24aaf2f2 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
945562d4 4;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
c44899a2 5;;;
233e7676 6;;; This file is part of GNU Guix.
c44899a2 7;;;
233e7676 8;;; GNU Guix is free software; you can redistribute it and/or modify it
c44899a2
LC
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
233e7676 13;;; GNU Guix is distributed in the hope that it will be useful, but
c44899a2
LC
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
233e7676 19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
c44899a2 20
1ffa7090 21(define-module (gnu packages multiprecision)
4a44e743 22 #:use-module (guix licenses)
59a43334 23 #:use-module (gnu packages)
1ffa7090 24 #:use-module (gnu packages m4)
c44899a2 25 #:use-module (guix packages)
87f5d366 26 #:use-module (guix download)
24aaf2f2 27 #:use-module (guix utils)
c44899a2
LC
28 #:use-module (guix build-system gnu))
29
30(define-public gmp
31 (package
32 (name "gmp")
722111ab 33 (version "6.0.0a")
c44899a2 34 (source (origin
87f5d366 35 (method url-fetch)
704197f4 36 (uri
93a6f552
AE
37 (string-append "mirror://gnu/gmp/gmp-"
38 version ".tar.xz"))
c44899a2
LC
39 (sha256
40 (base32
24aaf2f2
MW
41 "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
42 (patches (list (search-patch "gmp-arm-asm-nothumb.patch")))))
c44899a2
LC
43 (build-system gnu-build-system)
44 (native-inputs `(("m4" ,m4)))
9bf62d9b 45 (outputs '("out" "debug"))
c44899a2
LC
46 (arguments `(#:configure-flags
47 '(;; Build a "fat binary", with routines for several
48 ;; sub-architectures.
49 "--enable-fat"
24aaf2f2
MW
50 "--enable-cxx"
51
52 ;; FIXME: gmp-6.0.0a's config.guess fails on
53 ;; multi-core armhf systems.
54 ,@(if (%current-target-system)
55 '()
56 (let ((triplet
57 (nix-system->gnu-triplet (%current-system))))
58 (list (string-append "--build=" triplet)))))))
f50d2669 59 (synopsis "Multiple-precision arithmetic library")
c44899a2 60 (description
a22dc0c4
LC
61 "GMP is a library for arbitrary precision arithmetic, operating on
62signed integers, rational numbers and floating point numbers. The precision
63is only limited by the available memory. The library is highly optimized,
64with a design focus on execution speed. It is aimed at use in, for example,
65cryptography and computational algebra.")
4a44e743 66 (license lgpl3+)
c44899a2
LC
67 (home-page "http://gmplib.org/")))
68
69(define-public mpfr
70 (package
71 (name "mpfr")
14a3a673 72 (version "3.1.2")
c44899a2 73 (source (origin
87f5d366 74 (method url-fetch)
0db342a5 75 (uri (string-append "mirror://gnu/mpfr/mpfr-" version
c44899a2
LC
76 ".tar.xz"))
77 (sha256 (base32
14a3a673 78 "0fs501qi8l523gs3cpy4jjcnvwxggyfbklcys80wq236xx3hz79r"))))
c44899a2 79 (build-system gnu-build-system)
9bf62d9b 80 (outputs '("out" "debug"))
a6ef51e3 81 (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h>
f50d2669 82 (synopsis "C library for arbitrary precision floating-point arithmetic")
c44899a2 83 (description
79c311b8
LC
84 "GNU MPFR is a C library for performing multiple-precision,
85floating-point computations with correct rounding.")
4a44e743 86 (license lgpl3+)
c44899a2
LC
87 (home-page "http://www.mpfr.org/")))
88
89(define-public mpc
90 (package
91 (name "mpc")
945562d4 92 (version "1.0.3")
c44899a2 93 (source (origin
87f5d366 94 (method url-fetch)
c44899a2 95 (uri (string-append
8e1cd713 96 "mirror://gnu/mpc/mpc-" version ".tar.gz"))
945562d4
AE
97 (sha256
98 (base32
99 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))
c44899a2 100 (build-system gnu-build-system)
9bf62d9b 101 (outputs '("out" "debug"))
a6ef51e3
LC
102 (propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both
103 ("mpfr" ,mpfr)))
f50d2669 104 (synopsis "C library for arbitrary precision complex arithmetic")
c44899a2 105 (description
a22dc0c4
LC
106 "GNU MPC is a C library for performing arithmetic on complex numbers.
107It supports arbitrarily high precision and it correctly rounds the results.")
4a44e743 108 (license lgpl3+)
c44899a2 109 (home-page "http://mpc.multiprecision.org/")))