1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2016 Nicolas Goaziou <mail@nicolasgoaziou.fr>
6 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
7 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages multiprecision)
25 #:use-module (guix licenses)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages m4)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu))
40 (string-append "mirror://gnu/gmp/gmp-"
44 "04hrwahdxyqdik559604r7wrj9ffklwvipgfxgj4ys4skbl6bdc7"))
45 (patches (search-patches "gmp-faulty-test.patch"))))
46 (build-system gnu-build-system)
47 (native-inputs `(("m4" ,m4)))
48 (outputs '("out" "debug"))
49 (arguments `(#:parallel-tests? #f ; mpz/reuse fails otherwise
51 '(;; Build a "fat binary", with routines for several
55 ,@(cond ((target-mingw?)
56 ;; Static and shared cannot be built in one go:
57 ;; they produce different headers. We need shared.
61 (synopsis "Multiple-precision arithmetic library")
63 "@dfn{GMP} (the GNU Multiple Precision Arithmetic Library) is a library for
64 arbitrary-precision arithmetic, operating on signed integers, rational numbers
65 and floating point numbers. The precision is only limited by the available
66 memory. The library is highly optimized, with a design focus on execution
67 speed. It is aimed at use in, for example, cryptography and computational
70 (home-page "https://gmplib.org/")))
72 (define-public gmp-6.0
73 ;; We keep this one around to bootstrap GCC, to work around a compilation
75 ;; <https://gmplib.org/list-archives/gmp-bugs/2015-December/003848.html>.
81 (uri (string-append "mirror://gnu/gmp/gmp-"
85 "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))
86 (patches (search-patches "gmp-arm-asm-nothumb.patch"
87 "gmp-faulty-test.patch"))))))
95 (uri (string-append "mirror://gnu/mpfr/mpfr-" version
98 "0l598h9klpgkz2bp0rxiqb90mkqh9f2f81n5rpy191j00hdaqqks"))))
99 (build-system gnu-build-system)
100 (outputs '("out" "debug"))
101 (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h>
102 (synopsis "C library for arbitrary-precision floating-point arithmetic")
104 "GNU@tie{}@dfn{MPFR} (Multiple Precision Floating-Point Reliably) is a C
105 library for performing multiple-precision, floating-point computations with
108 (home-page "http://www.mpfr.org/")))
117 "mirror://gnu/mpc/mpc-" version ".tar.gz"))
120 "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))
121 (build-system gnu-build-system)
122 (outputs '("out" "debug"))
123 (propagated-inputs `(("gmp" ,gmp) ; <mpc.h> refers to both
125 (synopsis "C library for arbitrary-precision complex arithmetic")
127 "GNU@tie{}@dfn{MPC} (Multiple Precision Complex library) is a C library for
128 performing arithmetic on complex numbers. It supports arbitrarily high
129 precision and correctly rounds the results.")
131 (home-page "http://multiprecision.org/mpc/")))
140 (uri (string-append "https://gforge.inria.fr/frs/download.php"
141 "/latestfile/181/" name "-" version ".tar.bz2"))
143 (base32 "0bqr8yibl7jbrp0bw7xk1lm7nis7rv26jsz6y8ycvih8n9bx90r3"))))
144 (build-system gnu-build-system)
145 (propagated-inputs `(("gmp" ,gmp) ; <mpfi.h> refers to both
147 (synopsis "C library for arbitrary-precision interval arithmetic")
149 "@dfn{MPFI} (Multiple Precision Floating-point Interval) is a portable C
150 library for arbitrary-precision interval arithmetic, with intervals represented
151 using MPFR reliable floating-point numbers. It's based on the @dfn{GMP} (GNU
152 Multiple Precision Arithmetic) and GNU@tie{}@dfn{MPFR} (Multiple Precision
153 Floating-Point Reliably) libraries.
155 The purpose of arbitrary-precision interval arithmetic is to get results that
156 are both guaranteed, thanks to interval computation, and accurate, thanks to
157 multiple-precision arithmetic.")
159 (home-page "https://perso.ens-lyon.fr/nathalie.revol/software.html")))