distro: Change the module name space to (gnu ...).
[jackhill/guix/guix.git] / gnu / packages / algebra.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
90a6d47c 2;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
4e6b699d 3;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
2ed139c4 4;;;
233e7676 5;;; This file is part of GNU Guix.
2ed139c4 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
2ed139c4
AE
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.
11;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
2ed139c4
AE
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.
16;;;
17;;; You should have received a copy of the GNU General Public License
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
2ed139c4 19
1ffa7090 20(define-module (gnu packages algebra)
2ed139c4 21 #:use-module (distro)
1ffa7090
LC
22 #:use-module (gnu packages multiprecision)
23 #:use-module (gnu packages perl)
24 #:use-module (gnu packages readline)
25 #:use-module (gnu packages flex)
2ed139c4
AE
26 #:use-module (guix licenses)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu))
30
31
32(define-public mpfrcx
33 (package
34 (name "mpfrcx")
35 (version "0.4.1")
36 (source (origin
37 (method url-fetch)
38 (uri (string-append
39 "http://www.multiprecision.org/mpfrcx/download/mpfrcx-"
40 version ".tar.gz"))
41 (sha256
42 (base32
43 "1rrc75chxyicqjgg5mfhgbz7p9mx1fgh0qlx14a82m25vfhifnd1"))))
44 (build-system gnu-build-system)
45 (inputs `(("gmp" ,gmp)
46 ("mpfr" ,mpfr)
47 ("mpc" ,mpc)))
48 (synopsis "mpfrcx, a library for the arithmetic of univariate polynomials
49over arbitrary precision real or complex numbers")
50 (description
51 "mpfrcx is a library for the arithmetic of univariate polynomials over
52arbitrary precision real (mpfr) or complex (mpc) numbers, without control
53on the rounding. For the time being, only the few functions needed to
54implement the floating point approach to complex multiplication are
55implemented. On the other hand, these comprise asymptotically fast
56multiplication routines such as Toom–Cook and the FFT. ")
57 (license lgpl2.1+)
58 (home-page "http://mpfrcx.multiprecision.org/")))
59
2ed139c4
AE
60(define-public fplll
61 (package
62 (name "fplll")
63 (version "4.0.1")
64 (source (origin
65 (method url-fetch)
66 (uri (string-append
67 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
68 version ".tar.gz"))
69 (sha256 (base32
70 "122bpqdlikshhd7nmq0l5qfc0agyk7x21gvplv1l9hb77l8cy9rw"))))
71 (build-system gnu-build-system)
72 (inputs `(("gmp" ,gmp)
73 ("mpfr" ,mpfr)))
74 (synopsis "fplll, a library for LLL-reduction of euclidean lattices")
75 (description
76 "fplll LLL-reduces euclidean lattices. Since version 3, it can also
77solve the shortest vector problem.")
78 (license lgpl2.1+)
79 (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/")))
4e6b699d
LC
80
81(define-public gsl
82 (package
83 (name "gsl")
84 (version "1.15")
85 (source
86 (origin
87 (method url-fetch)
88 (uri (string-append "mirror://gnu/gsl/gsl-"
89 version ".tar.gz"))
90 (sha256
91 (base32
92 "18qf6jzz1r3mzb5qynywv4xx3z9g61hgkbpkdrhbgqh2g7jhgfc5"))))
93 (build-system gnu-build-system)
94 (home-page "http://www.gnu.org/software/gsl/")
95 (synopsis "The GNU Scientific Library, a large numerical library")
96 (description
97 "The GNU Scientific Library (GSL) is a numerical library for C
98and C++ programmers. It is free software under the GNU General
99Public License.
100
101The library provides a wide range of mathematical routines such
102as random number generators, special functions and least-squares
103fitting. There are over 1000 functions in total with an
104extensive test suite.")
105 (license gpl3+)))
90a6d47c
AE
106
107(define-public pari-gp
108 (package
109 (name "pari-gp")
110 (version "2.5.3")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append
114 "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
115 version ".tar.gz"))
116 (sha256 (base32
117 "0zsjccnnv00kwj2gk3ww2v530kjin1rgj8p8hbl4pwcnwc7m68gl"))))
118 (build-system gnu-build-system)
119 (inputs `(("gmp" ,gmp)
120 ("perl" ,perl)
121 ("readline" ,readline)))
122 (arguments
123 (lambda (system)
124 `(#:make-flags '("gp")
125;; FIXME: building the documentation requires tex; once this is available,
126;; replace "gp" by "all"
127 #:test-target "dobench"
128 #:phases
129 (alist-replace
130 'configure
131 (lambda* (#:key inputs outputs #:allow-other-keys)
132 (let ((out (assoc-ref outputs "out"))
133 (readline (assoc-ref inputs "readline"))
134 (gmp (assoc-ref inputs "gmp")))
135 (zero?
136 (system* "./Configure"
137 (string-append "--prefix=" out)
138 (string-append "--with-readline=" readline)
139 (string-append "--with-gmp=" gmp)))))
140;; FIXME: readline and gmp will be detected automatically in the next
141;; stable release
142 %standard-phases))))
143 (synopsis "PARI/GP, a computer algebra system for number theory")
144 (description
145 "PARI/GP is a widely used computer algebra system designed for fast
146computations in number theory (factorisations, algebraic number theory,
147elliptic curves...), but it also contains a large number of other useful
148functions to compute with mathematical entities such as matrices,
149polynomials, power series, algebraic numbers, etc., and a lot of
150transcendental functions.
151PARI is also available as a C library to allow for faster computations.")
152 (license gpl2+)
153 (home-page "http://pari.math.u-bordeaux.fr/")))
ed9f9a77
LC
154
155(define-public bc
156 (package
157 (name "bc")
158 (version "1.06")
159 (source (origin
160 (method url-fetch)
161 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
162 (sha256
163 (base32
164 "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf"))))
165 (build-system gnu-build-system)
166 (inputs `(("readline" ,readline)
167 ("flex" ,flex)))
168 (arguments
169 '(#:phases
170 (alist-replace 'configure
171 (lambda* (#:key outputs #:allow-other-keys)
172 ;; This old `configure' script doesn't support
173 ;; variables passed as arguments.
174 (let ((out (assoc-ref outputs "out")))
175 (setenv "CONFIG_SHELL" (which "bash"))
176 (zero?
177 (system* "./configure"
178 (string-append "--prefix=" out)))))
179 %standard-phases)))
180 (home-page "http://www.gnu.org/software/bc/")
181 (synopsis "GNU software calculator")
182 (description
183 "bc is an arbitrary precision numeric processing language. Syntax
184is similar to C, but differs in many substantial areas. It supports
185interactive execution of statements. bc is a utility included in the
186POSIX P1003.2/D11 draft standard.
187
188Since the POSIX document does not specify how bc must be implemented,
189this version does not use the historical method of having bc be a
190compiler for the dc calculator. This version has a single executable
191that both compiles the language and runs the resulting `byte code'. The
192byte code is not the dc language.")
193 (license gpl2+)))