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") | |
90c59e97 | 34 | (version "6.1.0") |
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 | |
90c59e97 | 42 | "12b9s4jn48gbar6dbs5qrlmljdmnq43xy3ji9yjzic0mwp6dmnk8")) |
42e735df | 43 | (patches (map search-patch |
e414a7de | 44 | '("gmp-faulty-test.patch"))))) |
c44899a2 LC |
45 | (build-system gnu-build-system) |
46 | (native-inputs `(("m4" ,m4))) | |
9bf62d9b | 47 | (outputs '("out" "debug")) |
4165fda2 AE |
48 | (arguments `(#:parallel-tests? #f ; mpz/reuse fails otherwise |
49 | #:configure-flags | |
c44899a2 LC |
50 | '(;; Build a "fat binary", with routines for several |
51 | ;; sub-architectures. | |
52 | "--enable-fat" | |
b2314ca2 | 53 | "--enable-cxx"))) |
f50d2669 | 54 | (synopsis "Multiple-precision arithmetic library") |
c44899a2 | 55 | (description |
a22dc0c4 LC |
56 | "GMP is a library for arbitrary precision arithmetic, operating on |
57 | signed integers, rational numbers and floating point numbers. The precision | |
58 | is only limited by the available memory. The library is highly optimized, | |
59 | with a design focus on execution speed. It is aimed at use in, for example, | |
60 | cryptography and computational algebra.") | |
4a44e743 | 61 | (license lgpl3+) |
c44899a2 LC |
62 | (home-page "http://gmplib.org/"))) |
63 | ||
8309c389 LC |
64 | (define-public gmp-6.0 |
65 | ;; We keep this one around to bootstrap GCC, to work around a compilation | |
66 | ;; issue on ARM. See | |
67 | ;; <https://gmplib.org/list-archives/gmp-bugs/2015-December/003848.html>. | |
68 | (package | |
69 | (inherit gmp) | |
70 | (version "6.0.0a") | |
71 | (source (origin | |
72 | (method url-fetch) | |
73 | (uri (string-append "mirror://gnu/gmp/gmp-" | |
74 | version ".tar.xz")) | |
75 | (sha256 | |
76 | (base32 | |
77 | "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli")) | |
78 | (patches (map search-patch | |
79 | '("gmp-arm-asm-nothumb.patch" | |
80 | "gmp-faulty-test.patch"))))))) | |
81 | ||
c44899a2 LC |
82 | (define-public mpfr |
83 | (package | |
84 | (name "mpfr") | |
87da4f1e | 85 | (version "3.1.3") |
c44899a2 | 86 | (source (origin |
87f5d366 | 87 | (method url-fetch) |
0db342a5 | 88 | (uri (string-append "mirror://gnu/mpfr/mpfr-" version |
c44899a2 LC |
89 | ".tar.xz")) |
90 | (sha256 (base32 | |
87da4f1e | 91 | "05jaa5z78lvrayld09nyr0v27c1m5dm9l7kr85v2bj4jv65s0db8")))) |
c44899a2 | 92 | (build-system gnu-build-system) |
9bf62d9b | 93 | (outputs '("out" "debug")) |
a6ef51e3 | 94 | (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h> |
f50d2669 | 95 | (synopsis "C library for arbitrary precision floating-point arithmetic") |
c44899a2 | 96 | (description |
79c311b8 LC |
97 | "GNU MPFR is a C library for performing multiple-precision, |
98 | floating-point computations with correct rounding.") | |
4a44e743 | 99 | (license lgpl3+) |
c44899a2 LC |
100 | (home-page "http://www.mpfr.org/"))) |
101 | ||
102 | (define-public mpc | |
103 | (package | |
104 | (name "mpc") | |
945562d4 | 105 | (version "1.0.3") |
c44899a2 | 106 | (source (origin |
87f5d366 | 107 | (method url-fetch) |
c44899a2 | 108 | (uri (string-append |
8e1cd713 | 109 | "mirror://gnu/mpc/mpc-" version ".tar.gz")) |
945562d4 AE |
110 | (sha256 |
111 | (base32 | |
112 | "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1")))) | |
c44899a2 | 113 | (build-system gnu-build-system) |
9bf62d9b | 114 | (outputs '("out" "debug")) |
a6ef51e3 LC |
115 | (propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both |
116 | ("mpfr" ,mpfr))) | |
f50d2669 | 117 | (synopsis "C library for arbitrary precision complex arithmetic") |
c44899a2 | 118 | (description |
a22dc0c4 LC |
119 | "GNU MPC is a C library for performing arithmetic on complex numbers. |
120 | It supports arbitrarily high precision and it correctly rounds the results.") | |
4a44e743 | 121 | (license lgpl3+) |
c44899a2 | 122 | (home-page "http://mpc.multiprecision.org/"))) |
61bb3555 NG |
123 | |
124 | (define-public mpfi | |
125 | (package | |
126 | (name "mpfi") | |
127 | (version "1.5.1") | |
128 | (source (origin | |
129 | (method url-fetch) | |
130 | (uri (string-append "https://gforge.inria.fr/frs/download.php/" | |
131 | "file/30130/mpfi-" version ".tar.gz")) | |
132 | (sha256 | |
133 | (base32 | |
134 | "1g2q6i7dqx40p4gw11da6jgfcbzmm26wxc69fwv8zpcdyg32a9za")))) | |
135 | (build-system gnu-build-system) | |
136 | (propagated-inputs `(("gmp" ,gmp) ; <mpfi.h> refers to both | |
137 | ("mpfr" ,mpfr))) | |
138 | (synopsis "C library for arbitrary precision interval arithmetic") | |
139 | (description "MPFI is intended to be a portable library written in C for | |
140 | arbitrary precision interval arithmetic with intervals represented using MPFR | |
141 | reliable floating-point numbers. It is based on the GNU MP library and on the | |
142 | MPFR library. The purpose of an arbitrary precision interval arithmetic is on | |
143 | the one hand to get guaranteed results, thanks to interval computation, and on | |
144 | the other hand to obtain accurate results, thanks to multiple precision | |
145 | arithmetic.") | |
146 | (license lgpl2.1+) | |
147 | (home-page "https://perso.ens-lyon.fr/nathalie.revol/software.html"))) |