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> |
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) |
59a43334 | 21 | #:use-module (gnu packages) |
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") | |
9c68798d | 35 | (version "0.4.2") |
2ed139c4 AE |
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 | |
9c68798d | 43 | "0grw66b255r574lvll1bqccm5myj2m8ajzsjaygcyq9zjnnbnhhy")))) |
2ed139c4 AE |
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 | |
49 | over arbitrary precision real or complex numbers") | |
50 | (description | |
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. ") | |
57 | (license lgpl2.1+) | |
58 | (home-page "http://mpfrcx.multiprecision.org/"))) | |
59 | ||
2ed139c4 AE |
60 | (define-public fplll |
61 | (package | |
62 | (name "fplll") | |
5a15ed50 | 63 | (version "4.0.4") |
2ed139c4 AE |
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 | |
5a15ed50 | 70 | "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b")))) |
2ed139c4 AE |
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 | |
77 | solve the shortest vector problem.") | |
78 | (license lgpl2.1+) | |
79 | (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/"))) | |
4e6b699d | 80 | |
90a6d47c AE |
81 | (define-public pari-gp |
82 | (package | |
83 | (name "pari-gp") | |
d9c4b6e9 | 84 | (version "2.5.4") |
90a6d47c AE |
85 | (source (origin |
86 | (method url-fetch) | |
87 | (uri (string-append | |
88 | "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-" | |
89 | version ".tar.gz")) | |
90 | (sha256 (base32 | |
d9c4b6e9 | 91 | "0gpsj5n8d1gyl7nq2y915sscs3d334ryrv8qgjdwqf3cr95f2dwz")))) |
90a6d47c AE |
92 | (build-system gnu-build-system) |
93 | (inputs `(("gmp" ,gmp) | |
94 | ("perl" ,perl) | |
95 | ("readline" ,readline))) | |
96 | (arguments | |
12abb19d LC |
97 | '(#:make-flags '("gp") |
98 | ;; FIXME: building the documentation requires tex; once this is available, | |
99 | ;; replace "gp" by "all" | |
100 | #:test-target "dobench" | |
101 | #:phases | |
102 | (alist-replace | |
103 | 'configure | |
104 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
105 | (let ((out (assoc-ref outputs "out")) | |
106 | (readline (assoc-ref inputs "readline")) | |
107 | (gmp (assoc-ref inputs "gmp"))) | |
108 | (zero? | |
109 | (system* "./Configure" | |
110 | (string-append "--prefix=" out) | |
111 | (string-append "--with-readline=" readline) | |
112 | (string-append "--with-gmp=" gmp))))) | |
113 | ;; FIXME: readline and gmp will be detected automatically in the next | |
114 | ;; stable release | |
115 | %standard-phases))) | |
90a6d47c AE |
116 | (synopsis "PARI/GP, a computer algebra system for number theory") |
117 | (description | |
118 | "PARI/GP is a widely used computer algebra system designed for fast | |
119 | computations in number theory (factorisations, algebraic number theory, | |
120 | elliptic curves...), but it also contains a large number of other useful | |
121 | functions to compute with mathematical entities such as matrices, | |
122 | polynomials, power series, algebraic numbers, etc., and a lot of | |
123 | transcendental functions. | |
124 | PARI is also available as a C library to allow for faster computations.") | |
125 | (license gpl2+) | |
126 | (home-page "http://pari.math.u-bordeaux.fr/"))) | |
ed9f9a77 LC |
127 | |
128 | (define-public bc | |
129 | (package | |
130 | (name "bc") | |
131 | (version "1.06") | |
132 | (source (origin | |
133 | (method url-fetch) | |
134 | (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz")) | |
135 | (sha256 | |
136 | (base32 | |
137 | "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf")))) | |
138 | (build-system gnu-build-system) | |
139 | (inputs `(("readline" ,readline) | |
140 | ("flex" ,flex))) | |
141 | (arguments | |
142 | '(#:phases | |
143 | (alist-replace 'configure | |
144 | (lambda* (#:key outputs #:allow-other-keys) | |
145 | ;; This old `configure' script doesn't support | |
146 | ;; variables passed as arguments. | |
147 | (let ((out (assoc-ref outputs "out"))) | |
148 | (setenv "CONFIG_SHELL" (which "bash")) | |
149 | (zero? | |
150 | (system* "./configure" | |
151 | (string-append "--prefix=" out))))) | |
152 | %standard-phases))) | |
153 | (home-page "http://www.gnu.org/software/bc/") | |
f50d2669 | 154 | (synopsis "Arbitrary precision numeric processing language") |
ed9f9a77 LC |
155 | (description |
156 | "bc is an arbitrary precision numeric processing language. Syntax | |
157 | is similar to C, but differs in many substantial areas. It supports | |
158 | interactive execution of statements. bc is a utility included in the | |
159 | POSIX P1003.2/D11 draft standard. | |
160 | ||
161 | Since the POSIX document does not specify how bc must be implemented, | |
162 | this version does not use the historical method of having bc be a | |
163 | compiler for the dc calculator. This version has a single executable | |
164 | that both compiles the language and runs the resulting `byte code'. The | |
165 | byte code is not the dc language.") | |
166 | (license gpl2+))) |