Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
42e735df | 2 | ;;; Copyright © 2012, 2013, 2015 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> |
61bb3555 | 5 | ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
c44899a2 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
c44899a2 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
c44899a2 LC |
10 | ;;; under the terms of the GNU General Public License as published by |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
c44899a2 LC |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
c44899a2 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages multiprecision) |
4a44e743 | 23 | #:use-module (guix licenses) |
59a43334 | 24 | #:use-module (gnu packages) |
1ffa7090 | 25 | #:use-module (gnu packages m4) |
c44899a2 | 26 | #:use-module (guix packages) |
87f5d366 | 27 | #:use-module (guix download) |
24aaf2f2 | 28 | #:use-module (guix utils) |
c44899a2 LC |
29 | #:use-module (guix build-system gnu)) |
30 | ||
31 | (define-public gmp | |
32 | (package | |
33 | (name "gmp") | |
9372d2b8 | 34 | (version "6.1.1") |
c44899a2 | 35 | (source (origin |
87f5d366 | 36 | (method url-fetch) |
704197f4 | 37 | (uri |
93a6f552 AE |
38 | (string-append "mirror://gnu/gmp/gmp-" |
39 | version ".tar.xz")) | |
c44899a2 LC |
40 | (sha256 |
41 | (base32 | |
9372d2b8 | 42 | "0cg84n482gcvl0s4xq4wgwsk4r0x0m8dnzpizwqdd2j8vw2rqvnk")) |
fc1adab1 | 43 | (patches (search-patches "gmp-faulty-test.patch")))) |
c44899a2 LC |
44 | (build-system gnu-build-system) |
45 | (native-inputs `(("m4" ,m4))) | |
9bf62d9b | 46 | (outputs '("out" "debug")) |
4165fda2 AE |
47 | (arguments `(#:parallel-tests? #f ; mpz/reuse fails otherwise |
48 | #:configure-flags | |
c44899a2 LC |
49 | '(;; Build a "fat binary", with routines for several |
50 | ;; sub-architectures. | |
51 | "--enable-fat" | |
b2314ca2 | 52 | "--enable-cxx"))) |
f50d2669 | 53 | (synopsis "Multiple-precision arithmetic library") |
c44899a2 | 54 | (description |
a22dc0c4 LC |
55 | "GMP is a library for arbitrary precision arithmetic, operating on |
56 | signed integers, rational numbers and floating point numbers. The precision | |
57 | is only limited by the available memory. The library is highly optimized, | |
58 | with a design focus on execution speed. It is aimed at use in, for example, | |
59 | cryptography and computational algebra.") | |
4a44e743 | 60 | (license lgpl3+) |
c44899a2 LC |
61 | (home-page "http://gmplib.org/"))) |
62 | ||
8309c389 LC |
63 | (define-public gmp-6.0 |
64 | ;; We keep this one around to bootstrap GCC, to work around a compilation | |
65 | ;; issue on ARM. See | |
66 | ;; <https://gmplib.org/list-archives/gmp-bugs/2015-December/003848.html>. | |
67 | (package | |
68 | (inherit gmp) | |
69 | (version "6.0.0a") | |
70 | (source (origin | |
71 | (method url-fetch) | |
72 | (uri (string-append "mirror://gnu/gmp/gmp-" | |
73 | version ".tar.xz")) | |
74 | (sha256 | |
75 | (base32 | |
76 | "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli")) | |
fc1adab1 AK |
77 | (patches (search-patches "gmp-arm-asm-nothumb.patch" |
78 | "gmp-faulty-test.patch")))))) | |
8309c389 | 79 | |
c44899a2 LC |
80 | (define-public mpfr |
81 | (package | |
82 | (name "mpfr") | |
6e4e336c | 83 | (version "3.1.4") |
c44899a2 | 84 | (source (origin |
87f5d366 | 85 | (method url-fetch) |
0db342a5 | 86 | (uri (string-append "mirror://gnu/mpfr/mpfr-" version |
c44899a2 LC |
87 | ".tar.xz")) |
88 | (sha256 (base32 | |
6e4e336c | 89 | "1x8pcnpn1vxfzfsr0js07rwhwyq27fmdzcfjpzi5773ldnqi653n")))) |
c44899a2 | 90 | (build-system gnu-build-system) |
9bf62d9b | 91 | (outputs '("out" "debug")) |
a6ef51e3 | 92 | (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h> |
f50d2669 | 93 | (synopsis "C library for arbitrary precision floating-point arithmetic") |
c44899a2 | 94 | (description |
79c311b8 LC |
95 | "GNU MPFR is a C library for performing multiple-precision, |
96 | floating-point computations with correct rounding.") | |
4a44e743 | 97 | (license lgpl3+) |
c44899a2 LC |
98 | (home-page "http://www.mpfr.org/"))) |
99 | ||
100 | (define-public mpc | |
101 | (package | |
102 | (name "mpc") | |
945562d4 | 103 | (version "1.0.3") |
c44899a2 | 104 | (source (origin |
87f5d366 | 105 | (method url-fetch) |
c44899a2 | 106 | (uri (string-append |
8e1cd713 | 107 | "mirror://gnu/mpc/mpc-" version ".tar.gz")) |
945562d4 AE |
108 | (sha256 |
109 | (base32 | |
110 | "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))) | |
c44899a2 | 111 | (build-system gnu-build-system) |
9bf62d9b | 112 | (outputs '("out" "debug")) |
a6ef51e3 LC |
113 | (propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both |
114 | ("mpfr" ,mpfr))) | |
f50d2669 | 115 | (synopsis "C library for arbitrary precision complex arithmetic") |
c44899a2 | 116 | (description |
a22dc0c4 LC |
117 | "GNU MPC is a C library for performing arithmetic on complex numbers. |
118 | It supports arbitrarily high precision and it correctly rounds the results.") | |
4a44e743 | 119 | (license lgpl3+) |
c44899a2 | 120 | (home-page "http://mpc.multiprecision.org/"))) |
61bb3555 NG |
121 | |
122 | (define-public mpfi | |
123 | (package | |
124 | (name "mpfi") | |
125 | (version "1.5.1") | |
126 | (source (origin | |
127 | (method url-fetch) | |
128 | (uri (string-append "https://gforge.inria.fr/frs/download.php/" | |
129 | "file/30130/mpfi-" version ".tar.gz")) | |
130 | (sha256 | |
131 | (base32 | |
132 | "1g2q6i7dqx40p4gw11da6jgfcbzmm26wxc69fwv8zpcdyg32a9za")))) | |
133 | (build-system gnu-build-system) | |
134 | (propagated-inputs `(("gmp" ,gmp) ; <mpfi.h> refers to both | |
135 | ("mpfr" ,mpfr))) | |
136 | (synopsis "C library for arbitrary precision interval arithmetic") | |
137 | (description "MPFI is intended to be a portable library written in C for | |
138 | arbitrary precision interval arithmetic with intervals represented using MPFR | |
139 | reliable floating-point numbers. It is based on the GNU MP library and on the | |
140 | MPFR library. The purpose of an arbitrary precision interval arithmetic is on | |
141 | the one hand to get guaranteed results, thanks to interval computation, and on | |
142 | the other hand to obtain accurate results, thanks to multiple precision | |
143 | arithmetic.") | |
144 | (license lgpl2.1+) | |
145 | (home-page "https://perso.ens-lyon.fr/nathalie.revol/software.html"))) |