summary refs log tree commit diff
path: root/distro/packages/multiprecision.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-11-04 22:37:22 +0100
committerLudovic Courtès <ludo@gnu.org>2012-11-04 22:37:22 +0100
commitc44899a28bd6287cd891899c2796cdcd18fa0a9e (patch)
treec8fd940f4716a9a45225a2557e9bc5549882bb8e /distro/packages/multiprecision.scm
parent18633d4f350160c2eb6f5101a628010322336e91 (diff)
downloadguix-c44899a28bd6287cd891899c2796cdcd18fa0a9e.tar.gz
distro: Split (distro packages base) into several files.
* distro/packages/base.scm (libsigsegv, gawk, perl, m4, gmp, mpfr, mpc,
  ncurses, readline, bash, libtool, libunistring, libffi, pkg-config,
  libgc): Move to modules of their own.
  (guile-1.8, guile-2.0): Move to...
* distro/packages/guile.scm: ... here.

* distro/packages/bash.scm, distro/packages/bdw-gc.scm,
  distro/packages/gawk.scm, distro/packages/libffi.scm,
  distro/packages/libsigsegv.scm, distro/packages/libtool.scm,
  distro/packages/libunistring.scm, distro/packages/m4.scm,
  distro/packages/multiprecision.scm, distro/packages/ncurses.scm,
  distro/packages/perl.scm, distro/packages/pkg-config.scm,
  distro/packages/readline.scm: New files.
Diffstat (limited to 'distro/packages/multiprecision.scm')
-rw-r--r--distro/packages/multiprecision.scm116
1 files changed, 116 insertions, 0 deletions
diff --git a/distro/packages/multiprecision.scm b/distro/packages/multiprecision.scm
new file mode 100644
index 0000000000..98e4c72a72
--- /dev/null
+++ b/distro/packages/multiprecision.scm
@@ -0,0 +1,116 @@
+;;; Guix --- Nix package management from Guile.         -*- coding: utf-8 -*-
+;;; Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of Guix.
+;;;
+;;; Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (distro packages multiprecision)
+  #:use-module (distro)
+  #:use-module (distro packages m4)
+  #:use-module (guix packages)
+  #:use-module (guix http)
+  #:use-module (guix utils)
+  #:use-module (guix build-system gnu))
+
+(define-public gmp
+  (package
+   (name "gmp")
+   (version "5.0.5")
+   (source (origin
+            (method http-fetch)
+            (uri (string-append "http://ftp.gnu.org/gnu/gmp/gmp-" version
+                                ".tar.bz2"))
+            (sha256
+             (base32
+              "1jfymbr90mpn0zw5sg001llqnvf2462y77vgjknrmfs1rjn8ln0z"))))
+   (build-system gnu-build-system)
+   (native-inputs `(("m4" ,m4)))
+   (arguments `(#:configure-flags
+                '(;; Build a "fat binary", with routines for several
+                  ;; sub-architectures.
+                  "--enable-fat"
+                  "--enable-cxx")))
+   (synopsis "GMP, the GNU multiple precision arithmetic library")
+   (description
+    "GMP is a free library for arbitrary precision arithmetic, operating on
+signed integers, rational numbers, and floating point numbers.  There is no
+practical limit to the precision except the ones implied by the available
+memory in the machine GMP runs on.  GMP has a rich set of functions, and the
+functions have a regular interface.
+
+The main target applications for GMP are cryptography applications and
+research, Internet security applications, algebra systems, computational
+algebra research, etc.
+
+GMP is carefully designed to be as fast as possible, both for small operands
+and for huge operands.  The speed is achieved by using fullwords as the basic
+arithmetic type, by using fast algorithms, with highly optimised assembly
+code for the most common inner loops for a lot of CPUs, and by a general
+emphasis on speed.
+
+GMP is faster than any other bignum library.  The advantage for GMP increases
+with the operand sizes for many operations, since GMP uses asymptotically
+faster algorithms.")
+   (license "LGPLv3+")
+   (home-page "http://gmplib.org/")))
+
+(define-public mpfr
+  (package
+   (name "mpfr")
+   (version "3.1.1")
+   (source (origin
+            (method http-fetch)
+            (uri (string-append "http://ftp.gnu.org/gnu/mpfr/mpfr-" version
+                                ".tar.xz"))
+            (sha256 (base32
+                     "0ym1ylcq803n52qrggxqmkz66gbn8ncc3ybawal31v5y5p1srma9"))))
+   (build-system gnu-build-system)
+   (inputs `(("gmp" ,gmp)))
+   (synopsis "GNU MPFR, a library for multiple-precision floating-point
+arithmetic")
+   (description
+    "The GNU MPFR library is a C library for multiple-precision
+floating-point computations with correct rounding.  MPFR is based on the GMP
+multiple-precision library.
+
+The main goal of MPFR is to provide a library for multiple-precision
+floating-point computation which is both efficient and has a well-defined
+semantics.  It copies the good ideas from the ANSI/IEEE-754 standard for
+double-precision floating-point arithmetic (53-bit mantissa).")
+   (license "LGPLv3+")
+   (home-page "http://www.mpfr.org/")))
+
+(define-public mpc
+  (package
+   (name "mpc")
+   (version "1.0")
+   (source (origin
+            (method http-fetch)
+            (uri (string-append
+                  "http://www.multiprecision.org/mpc/download/mpc-"
+                  version ".tar.gz"))
+            (sha256 (base32
+                     "00rxjmkpqnv6zzcyw9aa5w6rzaav32ys87km25zgfcv9i32km5cw"))))
+   (build-system gnu-build-system)
+   (inputs `(("gmp" ,gmp)
+             ("mpfr" ,mpfr)))
+   (synopsis "GNU MPC, a library for multiprecision complex arithmetic
+with exact rounding")
+   (description
+    "GNU MPC is a C library for the arithmetic of complex numbers with
+arbitrarily high precision and correct rounding of the result.  It is built
+upon and follows the same principles as GNU MPFR.")
+   (license "LGPLv3+")
+   (home-page "http://mpc.multiprecision.org/")))