1 ;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
2 ;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
4 ;;; This file is part of Guix.
6 ;;; Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (distro packages multiprecision)
20 #:use-module (guix licenses)
22 #:use-module (distro packages m4)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix utils)
26 #:use-module (guix build-system gnu))
34 (uri (string-append "mirror://gnu/gmp/gmp-" version
38 "1jfymbr90mpn0zw5sg001llqnvf2462y77vgjknrmfs1rjn8ln0z"))))
39 (build-system gnu-build-system)
40 (native-inputs `(("m4" ,m4)))
41 (arguments `(#:configure-flags
42 '(;; Build a "fat binary", with routines for several
46 (synopsis "GMP, the GNU multiple precision arithmetic library")
48 "GMP is a free library for arbitrary precision arithmetic, operating on
49 signed integers, rational numbers, and floating point numbers. There is no
50 practical limit to the precision except the ones implied by the available
51 memory in the machine GMP runs on. GMP has a rich set of functions, and the
52 functions have a regular interface.
54 The main target applications for GMP are cryptography applications and
55 research, Internet security applications, algebra systems, computational
56 algebra research, etc.
58 GMP is carefully designed to be as fast as possible, both for small operands
59 and for huge operands. The speed is achieved by using fullwords as the basic
60 arithmetic type, by using fast algorithms, with highly optimised assembly
61 code for the most common inner loops for a lot of CPUs, and by a general
64 GMP is faster than any other bignum library. The advantage for GMP increases
65 with the operand sizes for many operations, since GMP uses asymptotically
68 (home-page "http://gmplib.org/")))
76 (uri (string-append "mirror://gnu/mpfr/mpfr-" version
79 "0ym1ylcq803n52qrggxqmkz66gbn8ncc3ybawal31v5y5p1srma9"))))
80 (build-system gnu-build-system)
81 (inputs `(("gmp" ,gmp)))
82 (synopsis "GNU MPFR, a library for multiple-precision floating-point
85 "The GNU MPFR library is a C library for multiple-precision
86 floating-point computations with correct rounding. MPFR is based on the GMP
87 multiple-precision library.
89 The main goal of MPFR is to provide a library for multiple-precision
90 floating-point computation which is both efficient and has a well-defined
91 semantics. It copies the good ideas from the ANSI/IEEE-754 standard for
92 double-precision floating-point arithmetic (53-bit mantissa).")
94 (home-page "http://www.mpfr.org/")))
103 "mirror://gnu/mpc/mpc-" version ".tar.gz"))
105 "1zq0fidp1jii2j5k5n9hmx55a6wwid33gjzhimvxq9d5zrf82npd"))))
106 (build-system gnu-build-system)
107 (inputs `(("gmp" ,gmp)
109 (synopsis "GNU MPC, a library for multiprecision complex arithmetic
110 with exact rounding")
112 "GNU MPC is a C library for the arithmetic of complex numbers with
113 arbitrarily high precision and correct rounding of the result. It extends
114 the principles of the IEEE-754 standard for fixed precision real floating
115 point numbers to complex numbers, providing well-defined semantics for
116 every operation. At the same time, speed of operation at high precision
117 is a major design goal. The library is built upon and follows the same
118 principles as GNU MPFR.")
120 (home-page "http://mpc.multiprecision.org/")))