1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages algebra)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages multiprecision)
23 #:use-module (gnu packages perl)
24 #:use-module (gnu packages readline)
25 #:use-module (gnu packages flex)
26 #:use-module (guix licenses)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu))
39 "http://www.multiprecision.org/mpfrcx/download/mpfrcx-"
43 "1rrc75chxyicqjgg5mfhgbz7p9mx1fgh0qlx14a82m25vfhifnd1"))))
44 (build-system gnu-build-system)
45 (inputs `(("gmp" ,gmp)
48 (synopsis "mpfrcx, a library for the arithmetic of univariate polynomials
49 over arbitrary precision real or complex numbers")
51 "mpfrcx is a library for the arithmetic of univariate polynomials over
52 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
53 on the rounding. For the time being, only the few functions needed to
54 implement the floating point approach to complex multiplication are
55 implemented. On the other hand, these comprise asymptotically fast
56 multiplication routines such as Toom–Cook and the FFT. ")
58 (home-page "http://mpfrcx.multiprecision.org/")))
67 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
70 "0zkifm4s77cl2qib905lxpwvlwf6liy8q7bnmvfdfyz0fbgxl8z8"))))
71 (build-system gnu-build-system)
72 (inputs `(("gmp" ,gmp)
74 (synopsis "fplll, a library for LLL-reduction of euclidean lattices")
76 "fplll LLL-reduces euclidean lattices. Since version 3, it can also
77 solve the shortest vector problem.")
79 (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/")))
88 (uri (string-append "mirror://gnu/gsl/gsl-"
92 "18qf6jzz1r3mzb5qynywv4xx3z9g61hgkbpkdrhbgqh2g7jhgfc5"))))
93 (build-system gnu-build-system)
94 (home-page "http://www.gnu.org/software/gsl/")
95 (synopsis "Numerical library for C and C++")
97 "The GNU Scientific Library (GSL) is a numerical library for C
98 and C++ programmers. It is free software under the GNU General
101 The library provides a wide range of mathematical routines such
102 as random number generators, special functions and least-squares
103 fitting. There are over 1000 functions in total with an
104 extensive test suite.")
107 (define-public pari-gp
114 "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
117 "0zsjccnnv00kwj2gk3ww2v530kjin1rgj8p8hbl4pwcnwc7m68gl"))))
118 (build-system gnu-build-system)
119 (inputs `(("gmp" ,gmp)
121 ("readline" ,readline)))
123 '(#:make-flags '("gp")
124 ;; FIXME: building the documentation requires tex; once this is available,
125 ;; replace "gp" by "all"
126 #:test-target "dobench"
130 (lambda* (#:key inputs outputs #:allow-other-keys)
131 (let ((out (assoc-ref outputs "out"))
132 (readline (assoc-ref inputs "readline"))
133 (gmp (assoc-ref inputs "gmp")))
135 (system* "./Configure"
136 (string-append "--prefix=" out)
137 (string-append "--with-readline=" readline)
138 (string-append "--with-gmp=" gmp)))))
139 ;; FIXME: readline and gmp will be detected automatically in the next
142 (synopsis "PARI/GP, a computer algebra system for number theory")
144 "PARI/GP is a widely used computer algebra system designed for fast
145 computations in number theory (factorisations, algebraic number theory,
146 elliptic curves...), but it also contains a large number of other useful
147 functions to compute with mathematical entities such as matrices,
148 polynomials, power series, algebraic numbers, etc., and a lot of
149 transcendental functions.
150 PARI is also available as a C library to allow for faster computations.")
152 (home-page "http://pari.math.u-bordeaux.fr/")))
160 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
163 "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf"))))
164 (build-system gnu-build-system)
165 (inputs `(("readline" ,readline)
169 (alist-replace 'configure
170 (lambda* (#:key outputs #:allow-other-keys)
171 ;; This old `configure' script doesn't support
172 ;; variables passed as arguments.
173 (let ((out (assoc-ref outputs "out")))
174 (setenv "CONFIG_SHELL" (which "bash"))
176 (system* "./configure"
177 (string-append "--prefix=" out)))))
179 (home-page "http://www.gnu.org/software/bc/")
180 (synopsis "Arbitrary precision numeric processing language")
182 "bc is an arbitrary precision numeric processing language. Syntax
183 is similar to C, but differs in many substantial areas. It supports
184 interactive execution of statements. bc is a utility included in the
185 POSIX P1003.2/D11 draft standard.
187 Since the POSIX document does not specify how bc must be implemented,
188 this version does not use the historical method of having bc be a
189 compiler for the dc calculator. This version has a single executable
190 that both compiles the language and runs the resulting `byte code'. The
191 byte code is not the dc language.")