Commit | Line | Data |
---|---|---|
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> |
e2ca23c5 | 4 | ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> |
2ed139c4 | 5 | ;;; |
233e7676 | 6 | ;;; This file is part of GNU Guix. |
2ed139c4 | 7 | ;;; |
233e7676 | 8 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
2ed139c4 AE |
9 | ;;; under the terms of the GNU General Public License as published by |
10 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
11 | ;;; your option) any later version. | |
12 | ;;; | |
233e7676 | 13 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
2ed139c4 AE |
14 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | ;;; GNU General Public License for more details. | |
17 | ;;; | |
18 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 19 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
2ed139c4 | 20 | |
1ffa7090 | 21 | (define-module (gnu packages algebra) |
59a43334 | 22 | #:use-module (gnu packages) |
1ffa7090 LC |
23 | #:use-module (gnu packages multiprecision) |
24 | #:use-module (gnu packages perl) | |
25 | #:use-module (gnu packages readline) | |
26 | #:use-module (gnu packages flex) | |
2ed139c4 AE |
27 | #:use-module (guix licenses) |
28 | #:use-module (guix packages) | |
29 | #:use-module (guix download) | |
30 | #:use-module (guix build-system gnu)) | |
31 | ||
32 | ||
33 | (define-public mpfrcx | |
34 | (package | |
35 | (name "mpfrcx") | |
9c68798d | 36 | (version "0.4.2") |
2ed139c4 AE |
37 | (source (origin |
38 | (method url-fetch) | |
39 | (uri (string-append | |
40 | "http://www.multiprecision.org/mpfrcx/download/mpfrcx-" | |
41 | version ".tar.gz")) | |
42 | (sha256 | |
43 | (base32 | |
9c68798d | 44 | "0grw66b255r574lvll1bqccm5myj2m8ajzsjaygcyq9zjnnbnhhy")))) |
2ed139c4 AE |
45 | (build-system gnu-build-system) |
46 | (inputs `(("gmp" ,gmp) | |
47 | ("mpfr" ,mpfr) | |
48 | ("mpc" ,mpc))) | |
49 | (synopsis "mpfrcx, a library for the arithmetic of univariate polynomials | |
50 | over arbitrary precision real or complex numbers") | |
51 | (description | |
52 | "mpfrcx is a library for the arithmetic of univariate polynomials over | |
53 | arbitrary precision real (mpfr) or complex (mpc) numbers, without control | |
54 | on the rounding. For the time being, only the few functions needed to | |
55 | implement the floating point approach to complex multiplication are | |
56 | implemented. On the other hand, these comprise asymptotically fast | |
57 | multiplication routines such as Toom–Cook and the FFT. ") | |
58 | (license lgpl2.1+) | |
59 | (home-page "http://mpfrcx.multiprecision.org/"))) | |
60 | ||
2ed139c4 AE |
61 | (define-public fplll |
62 | (package | |
63 | (name "fplll") | |
5a15ed50 | 64 | (version "4.0.4") |
2ed139c4 AE |
65 | (source (origin |
66 | (method url-fetch) | |
67 | (uri (string-append | |
68 | "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-" | |
69 | version ".tar.gz")) | |
70 | (sha256 (base32 | |
5a15ed50 | 71 | "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b")))) |
2ed139c4 AE |
72 | (build-system gnu-build-system) |
73 | (inputs `(("gmp" ,gmp) | |
74 | ("mpfr" ,mpfr))) | |
75 | (synopsis "fplll, a library for LLL-reduction of euclidean lattices") | |
76 | (description | |
77 | "fplll LLL-reduces euclidean lattices. Since version 3, it can also | |
78 | solve the shortest vector problem.") | |
79 | (license lgpl2.1+) | |
80 | (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/"))) | |
4e6b699d | 81 | |
90a6d47c AE |
82 | (define-public pari-gp |
83 | (package | |
84 | (name "pari-gp") | |
9a6a9dae | 85 | (version "2.5.5") |
90a6d47c AE |
86 | (source (origin |
87 | (method url-fetch) | |
88 | (uri (string-append | |
89 | "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-" | |
90 | version ".tar.gz")) | |
91 | (sha256 (base32 | |
9a6a9dae | 92 | "058nw1fhggy7idii4f124ami521lv3izvngs9idfz964aks8cvvn")))) |
90a6d47c AE |
93 | (build-system gnu-build-system) |
94 | (inputs `(("gmp" ,gmp) | |
95 | ("perl" ,perl) | |
96 | ("readline" ,readline))) | |
97 | (arguments | |
12abb19d LC |
98 | '(#:make-flags '("gp") |
99 | ;; FIXME: building the documentation requires tex; once this is available, | |
100 | ;; replace "gp" by "all" | |
101 | #:test-target "dobench" | |
102 | #:phases | |
103 | (alist-replace | |
104 | 'configure | |
105 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
106 | (let ((out (assoc-ref outputs "out")) | |
107 | (readline (assoc-ref inputs "readline")) | |
108 | (gmp (assoc-ref inputs "gmp"))) | |
109 | (zero? | |
110 | (system* "./Configure" | |
111 | (string-append "--prefix=" out) | |
112 | (string-append "--with-readline=" readline) | |
113 | (string-append "--with-gmp=" gmp))))) | |
114 | ;; FIXME: readline and gmp will be detected automatically in the next | |
115 | ;; stable release | |
116 | %standard-phases))) | |
90a6d47c AE |
117 | (synopsis "PARI/GP, a computer algebra system for number theory") |
118 | (description | |
119 | "PARI/GP is a widely used computer algebra system designed for fast | |
120 | computations in number theory (factorisations, algebraic number theory, | |
121 | elliptic curves...), but it also contains a large number of other useful | |
122 | functions to compute with mathematical entities such as matrices, | |
123 | polynomials, power series, algebraic numbers, etc., and a lot of | |
124 | transcendental functions. | |
125 | PARI is also available as a C library to allow for faster computations.") | |
126 | (license gpl2+) | |
127 | (home-page "http://pari.math.u-bordeaux.fr/"))) | |
ed9f9a77 | 128 | |
f854a8c1 AE |
129 | (define-public gp2c |
130 | (package | |
131 | (name "gp2c") | |
132 | (version "0.0.8") | |
133 | (source (origin | |
134 | (method url-fetch) | |
135 | (uri (string-append | |
136 | "http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-" | |
137 | version ".tar.gz")) | |
138 | (sha256 (base32 | |
139 | "03fgiwy2si264g3zfgw2yi6i2l8szl5m106zgwk77sddshk20b34")))) | |
140 | (build-system gnu-build-system) | |
141 | (inputs `(("pari-gp" ,pari-gp))) | |
142 | (arguments | |
143 | '(#:configure-flags | |
144 | (list (string-append "--with-paricfg=" | |
145 | (assoc-ref %build-inputs "pari-gp") | |
146 | "/lib/pari/pari.cfg")))) | |
147 | (synopsis "PARI/GP, a computer algebra system for number theory") | |
148 | (description | |
149 | "PARI/GP is a widely used computer algebra system designed for fast | |
150 | computations in number theory (factorisations, algebraic number theory, | |
151 | elliptic curves...), but it also contains a large number of other useful | |
152 | functions to compute with mathematical entities such as matrices, | |
153 | polynomials, power series, algebraic numbers, etc., and a lot of | |
154 | transcendental functions. | |
155 | PARI is also available as a C library to allow for faster computations. | |
156 | ||
157 | GP2C, the GP to C compiler, translates GP scripts to PARI programs.") | |
158 | (license gpl2) | |
159 | (home-page "http://pari.math.u-bordeaux.fr/"))) | |
160 | ||
ed9f9a77 LC |
161 | (define-public bc |
162 | (package | |
163 | (name "bc") | |
164 | (version "1.06") | |
165 | (source (origin | |
166 | (method url-fetch) | |
167 | (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz")) | |
168 | (sha256 | |
169 | (base32 | |
170 | "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf")))) | |
171 | (build-system gnu-build-system) | |
c4c4cc05 JD |
172 | (inputs `(("readline" ,readline))) |
173 | (native-inputs `(("flex" ,flex))) | |
ed9f9a77 LC |
174 | (arguments |
175 | '(#:phases | |
176 | (alist-replace 'configure | |
177 | (lambda* (#:key outputs #:allow-other-keys) | |
178 | ;; This old `configure' script doesn't support | |
179 | ;; variables passed as arguments. | |
180 | (let ((out (assoc-ref outputs "out"))) | |
181 | (setenv "CONFIG_SHELL" (which "bash")) | |
182 | (zero? | |
e2ca23c5 MW |
183 | (system* |
184 | "./configure" | |
185 | (string-append "--prefix=" out) | |
186 | ;; By default, man and info pages are put in | |
187 | ;; PREFIX/{man,info}, but we want them in | |
188 | ;; PREFIX/share/{man,info}. | |
189 | (string-append "--mandir=" out "/share/man") | |
190 | (string-append "--infodir=" out "/share/info"))))) | |
ed9f9a77 LC |
191 | %standard-phases))) |
192 | (home-page "http://www.gnu.org/software/bc/") | |
f50d2669 | 193 | (synopsis "Arbitrary precision numeric processing language") |
ed9f9a77 | 194 | (description |
a22dc0c4 LC |
195 | "bc is an arbitrary precision numeric processing language. It includes |
196 | an interactive environment for evaluating mathematical statements. Its | |
197 | syntax is similar to that of C, so basic usage is familiar. It also includes | |
198 | \"dc\", a reverse-polish calculator.") | |
ed9f9a77 | 199 | (license gpl2+))) |
37e6cdcd LC |
200 | |
201 | (define-public fftw | |
202 | (package | |
203 | (name "fftw") | |
204 | (version "3.3.3") | |
205 | (source (origin | |
206 | (method url-fetch) | |
207 | (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-" | |
208 | version".tar.gz")) | |
209 | (sha256 | |
210 | (base32 | |
211 | "1wwp9b2va7vkq3ay7a9jk22nr4x5q6m37rzqy2j8y3d11c5grkc5")))) | |
212 | (build-system gnu-build-system) | |
213 | (arguments | |
214 | '(#:configure-flags '("--enable-shared" "--enable-openmp") | |
215 | #:phases (alist-cons-before | |
216 | 'build 'no-native | |
217 | (lambda _ | |
218 | ;; By default '-mtune=native' is used. However, that may | |
219 | ;; cause the use of ISA extensions (SSE2, etc.) that are | |
220 | ;; not necessarily available on the user's machine when | |
221 | ;; that package is built on a different machine. | |
222 | (substitute* (find-files "." "Makefile$") | |
223 | (("-mtune=native") ""))) | |
224 | %standard-phases))) | |
225 | (native-inputs `(("perl" ,perl))) | |
226 | (home-page "http://fftw.org") | |
227 | (synopsis "Computing the discrete Fourier transform") | |
228 | (description | |
229 | "FFTW is a C subroutine library for computing the discrete Fourier | |
230 | transform (DFT) in one or more dimensions, of arbitrary input size, and of | |
231 | both real and complex data (as well as of even/odd data---i.e. the discrete | |
232 | cosine/ sine transforms or DCT/DST).") | |
233 | (license gpl2+))) |