scripts: discover: Remove file locks.
[jackhill/guix/guix.git] / gnu / packages / algebra.scm
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
3f074a21 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge <andreas@enge.fr>
4b0bf990 3;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
a733253b 4;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
69d5909e 5;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
67f39dd5 6;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
e188d2f8 7;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
5144e314 8;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
f71f29ca 9;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
eb6785cf 10;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
06b2bc55 11;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
4c877704 12;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
7cc9e1dc 13;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
feba2c97 14;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
d0337a22 15;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
2ed139c4 16;;;
233e7676 17;;; This file is part of GNU Guix.
2ed139c4 18;;;
233e7676 19;;; GNU Guix is free software; you can redistribute it and/or modify it
2ed139c4
AE
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
233e7676 24;;; GNU Guix is distributed in the hope that it will be useful, but
2ed139c4
AE
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
233e7676 30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
2ed139c4 31
1ffa7090 32(define-module (gnu packages algebra)
59a43334 33 #:use-module (gnu packages)
14e6520e 34 #:use-module (gnu packages autotools)
fdb513a7 35 #:use-module (gnu packages bison)
70770b93 36 #:use-module (gnu packages check)
10b1f688 37 #:use-module (gnu packages compression)
70770b93 38 #:use-module (gnu packages cpp)
99828fa7 39 #:use-module (gnu packages documentation)
f71f29ca 40 #:use-module (gnu packages ed)
5894b604 41 #:use-module (gnu packages flex)
57497c57
NG
42 #:use-module (gnu packages fltk)
43 #:use-module (gnu packages gl)
aae03c48 44 #:use-module (gnu packages graphviz)
57497c57 45 #:use-module (gnu packages image)
c8d99608 46 #:use-module (gnu packages java)
d0337a22 47 #:use-module (gnu packages llvm)
aae03c48 48 #:use-module (gnu packages maths)
0fc54d4b 49 #:use-module (gnu packages mpi)
5894b604 50 #:use-module (gnu packages multiprecision)
1ceeaa5d 51 #:use-module (gnu packages ocaml)
1ffa7090 52 #:use-module (gnu packages perl)
4bf9cb40 53 #:use-module (gnu packages pkg-config)
6d3896b9 54 #:use-module (gnu packages pulseaudio)
aae03c48 55 #:use-module (gnu packages python)
1d6589db 56 #:use-module (gnu packages python-xyz)
5894b604 57 #:use-module (gnu packages readline)
b7194849 58 #:use-module (gnu packages shells)
8f9ac901 59 #:use-module (gnu packages tex)
f71f29ca 60 #:use-module (gnu packages texinfo)
57497c57 61 #:use-module (gnu packages xiph)
fb8d1be8 62 #:use-module (gnu packages xorg)
c8d99608 63 #:use-module (guix build-system ant)
7569c5cb 64 #:use-module (guix build-system gnu)
8f4b1dfb 65 #:use-module (guix build-system cmake)
1d6589db 66 #:use-module (guix build-system python)
5894b604 67 #:use-module (guix download)
c8d99608 68 #:use-module (guix git-download)
697eb65d 69 #:use-module (guix hg-download)
5894b604
TGR
70 #:use-module ((guix licenses) #:prefix license:)
71 #:use-module (guix packages)
7569c5cb 72 #:use-module (guix utils))
2ed139c4
AE
73
74
75(define-public mpfrcx
76 (package
77 (name "mpfrcx")
5f8ea8e4 78 (version "0.6")
2ed139c4
AE
79 (source (origin
80 (method url-fetch)
81 (uri (string-append
43a776e2 82 "http://www.multiprecision.org/downloads/mpfrcx-"
2ed139c4
AE
83 version ".tar.gz"))
84 (sha256
85 (base32
5f8ea8e4 86 "0gz5rma9al2jrifpknqkcnd9dkf8l05jcxy3s4ghwhd4y3h5dwia"))))
2ed139c4 87 (build-system gnu-build-system)
878c8f3f
AE
88 (propagated-inputs
89 `(("gmp" ,gmp)
90 ("mpfr" ,mpfr)
91 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
35b9e423 92 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
2ed139c4 93 (description
35b9e423 94 "Mpfrcx is a library for the arithmetic of univariate polynomials over
2ed139c4 95arbitrary precision real (mpfr) or complex (mpc) numbers, without control
35b9e423 96on the rounding. For the time being, only the few functions needed to
2ed139c4 97implement the floating point approach to complex multiplication are
35b9e423 98implemented. On the other hand, these comprise asymptotically fast
e881752c 99multiplication routines such as Toom–Cook and the FFT.")
43a776e2 100 (license license:lgpl3+)
79d1550f 101 (home-page "http://www.multiprecision.org/mpfrcx/")))
2ed139c4 102
7c5f6231
AE
103(define-public gf2x
104 (package
105 (name "gf2x")
106 (version "1.2")
107 (source (origin
108 (method url-fetch)
109 (uri (string-append
110 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
111 version ".tar.gz"))
112 (sha256
113 (base32
114 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
115 (build-system gnu-build-system)
116 (synopsis "Arithmetic of polynomials over binary finite fields")
117 (description
118 "The gf2x library provides arithmetic of polynomials over finite fields
119of characteristic 2. It implements the multiplication, squaring and
120greatest common divisor operations.")
121 (license license:gpl3+)
122 (home-page "https://gforge.inria.fr/projects/gf2x/")))
123
10b1f688
AE
124(define-public cm
125 (package
126 (name "cm")
4c09ec43 127 (version "0.3.1")
10b1f688
AE
128 (source (origin
129 (method url-fetch)
130 (uri (string-append
4c09ec43 131 "http://www.multiprecision.org/downloads/cm-"
10b1f688
AE
132 version ".tar.gz"))
133 (sha256
134 (base32
4c09ec43 135 "0qq6b1kwb1byj8ws33ya5awq0ilkpm32037pi1l4cf2737fg9m42"))))
10b1f688
AE
136 (build-system gnu-build-system)
137 (propagated-inputs
138 `(("mpfrcx" ,mpfrcx)
139 ("zlib" ,zlib))) ; Header files included from cm_common.h.
140 (inputs
141 `(("pari-gp" ,pari-gp)))
142 (synopsis "CM constructions for elliptic curves")
143 (description
144 "The CM software implements the construction of ring class fields of
145imaginary quadratic number fields and of elliptic curves with complex
146multiplication via floating point approximations. It consists of libraries
147that can be called from within a C program and of executable command
148line applications.")
81b55bf7 149 (license license:gpl3+)
79d1550f 150 (home-page "http://www.multiprecision.org/cm/")))
10b1f688 151
2ed139c4
AE
152(define-public fplll
153 (package
1de48e8f 154 (name "fplll")
82f983da 155 (version "5.3.3")
1de48e8f
NG
156 (source (origin
157 (method git-fetch)
158 (uri (git-reference
b0e7b699 159 (url "https://github.com/fplll/fplll")
1de48e8f
NG
160 (commit version)))
161 (file-name (git-file-name name version))
162 (sha256
163 (base32
049a1714
AE
164 "06nyfidagp8pc2kfcw88ldgb2b1xm0a8z31n0sln7j72ihlmd8zj"))
165 (patches (search-patches "fplll-std-fenv.patch"))))
1de48e8f
NG
166 (build-system gnu-build-system)
167 (native-inputs
168 `(("autoconf" ,autoconf)
169 ("automake" ,automake)
82f983da
AE
170 ("libtool" ,libtool)
171 ("pkg-config" ,pkg-config)))
049a1714 172 (propagated-inputs ; header files pulled in by fplll/defs.h
1de48e8f
NG
173 `(("gmp" ,gmp)
174 ("mpfr" ,mpfr)))
175 (home-page "https://github.com/fplll/fplll")
176 (synopsis "Library for LLL-reduction of euclidean lattices")
177 (description
178 "fplll contains implementations of several lattice algorithms.
179The implementation relies on floating-point orthogonalization, and LLL
180is central to the code, hence the name.
181
182It includes implementations of floating-point LLL reduction
183algorithms, offering different speed/guarantees ratios. It contains
184a @emph{wrapper} choosing the estimated best sequence of variants in
185order to provide a guaranteed output as fast as possible. In the case
186of the wrapper, the succession of variants is oblivious to the user.
187
188It includes an implementation of the BKZ reduction algorithm,
189including the BKZ-2.0 improvements (extreme enumeration
190pruning, pre-processing of blocks, early termination). Additionally,
191Slide reduction and self dual BKZ are supported.
192
193It also includes a floating-point implementation of the
194Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
195vector. For the same task, the GaussSieve algorithm is also available
196in fplll. Finally, it contains a variant of the enumeration algorithm
197that computes a lattice vector closest to a given vector belonging to
198the real span of the lattice.")
199 (license license:lgpl2.1+)))
4e6b699d 200
25cbaa9e
NG
201(define-public python-fpylll
202 (package
203 (name "python-fpylll")
28045580 204 (version "0.5.2")
25cbaa9e
NG
205 (source
206 (origin
207 ;; Pypi contains and older release, so we use a tagged release from
208 ;; Github instead.
209 (method git-fetch)
210 (uri (git-reference
b0e7b699 211 (url "https://github.com/fplll/fpylll")
25cbaa9e 212 (commit (string-append version "dev"))))
f1d4d79f 213 (file-name (git-file-name name version))
25cbaa9e
NG
214 (sha256
215 (base32
28045580 216 "1a25iibihph626jl4wbs4b77xc4a2c4nfc2ypscf9wpani3dnhjf"))))
25cbaa9e
NG
217 (build-system python-build-system)
218 (inputs
219 `(("fplll" ,fplll)
220 ("gmp" ,gmp)
221 ("mpfr" ,mpfr)
222 ("pari-gp" ,pari-gp)))
223 (propagated-inputs
224 `(("cysignals" ,python-cysignals)
225 ("cython" ,python-cython)
226 ("flake8" ,python-flake8)
227 ("numpy" ,python-numpy)
228 ("pytest" ,python-pytest)))
229 (home-page "https://github.com/fplll/fpylll")
230 (synopsis "Python interface for fplll")
231 (description "fpylll is a Python wrapper for fplll.")
232 (license license:gpl2+)))
233
90a6d47c
AE
234(define-public pari-gp
235 (package
67f39dd5 236 (name "pari-gp")
6657d739 237 (version "2.13.0")
67f39dd5
RW
238 (source (origin
239 (method url-fetch)
240 (uri (string-append
241 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
242 version ".tar.gz"))
243 (sha256
244 (base32
6657d739 245 "14xs90wrw8mbdx08hxlbhiahp6kgjq6yh27zjw7fvhfjx5nr84f8"))))
67f39dd5
RW
246 (build-system gnu-build-system)
247 (native-inputs
248 `(("texlive" ,(texlive-union
f75aa97f 249 (list texlive-amsfonts)))))
67f39dd5
RW
250 (inputs `(("gmp" ,gmp)
251 ("libx11" ,libx11)
252 ("perl" ,perl)
253 ("readline" ,readline)))
254 (arguments
255 '(#:make-flags '("all")
256 #:test-target "dobench"
257 #:phases
258 (modify-phases %standard-phases
259 (replace 'configure
260 (lambda* (#:key outputs #:allow-other-keys)
261 (invoke "./Configure"
262 (string-append "--prefix="
263 (assoc-ref outputs "out"))))))))
264 (synopsis "PARI/GP, a computer algebra system for number theory")
265 (description
266 "PARI/GP is a widely used computer algebra system designed for fast
90a6d47c
AE
267computations in number theory (factorisations, algebraic number theory,
268elliptic curves...), but it also contains a large number of other useful
269functions to compute with mathematical entities such as matrices,
270polynomials, power series, algebraic numbers, etc., and a lot of
271transcendental functions.
272PARI is also available as a C library to allow for faster computations.")
67f39dd5
RW
273 (license license:gpl2+)
274 (home-page "https://pari.math.u-bordeaux.fr/")))
ed9f9a77 275
f854a8c1
AE
276(define-public gp2c
277 (package
278 (name "gp2c")
e239135c 279 (version "0.0.11pl4")
f854a8c1
AE
280 (source (origin
281 (method url-fetch)
282 (uri (string-append
eeb8b0e6 283 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
f854a8c1 284 version ".tar.gz"))
324bdcd8
AE
285 (sha256
286 (base32
e239135c 287 "1cnnh7diqc97q76q5pyhpbljbhc0sz8mlrbqgiwi0sjkgh8iqsj0"))))
f854a8c1 288 (build-system gnu-build-system)
c67ccedd 289 (native-inputs `(("perl" ,perl)))
f854a8c1
AE
290 (inputs `(("pari-gp" ,pari-gp)))
291 (arguments
292 '(#:configure-flags
293 (list (string-append "--with-paricfg="
294 (assoc-ref %build-inputs "pari-gp")
295 "/lib/pari/pari.cfg"))))
296 (synopsis "PARI/GP, a computer algebra system for number theory")
297 (description
298 "PARI/GP is a widely used computer algebra system designed for fast
299computations in number theory (factorisations, algebraic number theory,
300elliptic curves...), but it also contains a large number of other useful
301functions to compute with mathematical entities such as matrices,
302polynomials, power series, algebraic numbers, etc., and a lot of
303transcendental functions.
304PARI is also available as a C library to allow for faster computations.
305
306GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
9f51293c 307 (license license:gpl2)
eeb8b0e6 308 (home-page "https://pari.math.u-bordeaux.fr/")))
f854a8c1 309
ddfb6280
TGR
310(define fplll-4-cmh
311 (package
312 (inherit fplll)
313 (name "fplll")
314 (version "4.0.4")
315 (source
316 (origin
317 (method url-fetch)
318 (uri (string-append
319 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
320 version ".tar.gz"))
321 (sha256
322 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
323
eea7cd75
AE
324(define-public cmh
325 (package
326 (name "cmh")
327 (version "1.0")
328 (source (origin
329 (method url-fetch)
330 (uri (string-append
331 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
332 version ".tar.gz"))
333 (sha256
334 (base32
335 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
336 (build-system gnu-build-system)
337 (inputs
338 `(("gmp" ,gmp)
339 ("mpfr" ,mpfr)
340 ("mpc" ,mpc)
341 ("mpfrcx" ,mpfrcx)
ddfb6280 342 ("fplll" ,fplll-4-cmh)
eea7cd75
AE
343 ("pari-gp" ,pari-gp)))
344 (synopsis "Igusa class polynomial computations")
345 (description
346 "The CMH software computes Igusa (genus 2) class polynomials, which
347parameterize the CM points in the moduli space of 2-dimensional abelian
348varieties, i.e. Jacobians of hyperelliptic curves.
349It can also be used to compute theta constants at arbitrary
350precision.")
351 (license license:gpl3+)
e188d2f8
EF
352 (home-page
353 "https://gitlab.inria.fr/cmh/cmh#cmh-computation-of-genus-2-class-polynomials")))
eea7cd75 354
7fc0e3db 355(define-public giac
57497c57 356 (package
7fc0e3db 357 (name "giac")
191a4ced 358 (version "1.6.0-31")
a733253b
NG
359 (source
360 (origin
361 (method url-fetch)
362 ;; "~parisse/giac" is not used because the maintainer regularly
363 ;; overwrites the release tarball there, introducing a checksum
364 ;; mismatch every time. See
365 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
366 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
367 "~parisse/debian/dists/stable/main/source/"
368 "giac_" version ".tar.gz"))
369 (sha256
191a4ced 370 (base32 "1dr1y88sx2gzldn0zl6p8b1ngjjcmh89iv4kzyhi2cf74j3yw85m"))))
57497c57
NG
371 (build-system gnu-build-system)
372 (arguments
af90cc45
NG
373 `(#:modules ((ice-9 ftw)
374 (guix build utils)
375 (guix build gnu-build-system))
376 #:phases
57497c57
NG
377 (modify-phases %standard-phases
378 (add-after 'unpack 'patch-bin-cp
90d5ec55 379 ;; Some Makefiles contain hard-coded "/bin/cp".
57497c57 380 (lambda _
07c3c3ba
NG
381 (substitute* (cons "micropython-1.12/xcas/Makefile"
382 (find-files "doc" "^Makefile"))
57497c57 383 (("/bin/cp") (which "cp")))
90d5ec55
NG
384 #t))
385 (add-after 'unpack 'disable-failing-test
386 ;; FIXME: Test failing. Not sure why.
387 (lambda _
388 (substitute* "check/Makefile.in"
389 (("chk_fhan11") ""))
af90cc45 390 #t))
9f73ac24 391 (add-after 'install 'fix-doc
af90cc45 392 (lambda* (#:key outputs #:allow-other-keys)
9f73ac24
NG
393 (let ((out (assoc-ref outputs "out")))
394 ;; Most French documentation has a non-commercial
395 ;; license, so we need to remove it.
396 (with-directory-excursion (string-append out "/share/giac/doc/fr")
397 (for-each delete-file-recursively
398 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
399 "castor")))
400 ;; Remove duplicate documentation in
401 ;; "%out/share/doc/giac/", where Xcas does not expect
402 ;; to find it.
403 (delete-file-recursively (string-append out "/share/doc/giac"))
404 #t)))
405 (add-after 'install 'remove-unnecessary-executable
406 (lambda* (#:key outputs #:allow-other-keys)
407 (let ((out (assoc-ref outputs "out")))
408 (delete-file (string-append out "/bin/xcasnew"))
409 #t))))))
57497c57 410 (inputs
07c3c3ba 411 ;; TODO: Add libnauty, unbundle "libmicropython.a".
57497c57 412 `(("fltk" ,fltk)
6d3896b9 413 ("glpk" ,glpk)
57497c57
NG
414 ("gmp" ,gmp)
415 ("gsl" ,gsl)
416 ("lapack" ,lapack)
417 ("libao" ,ao)
4bd428a7 418 ("libjpeg" ,libjpeg-turbo)
57497c57 419 ("libpng" ,libpng)
6d3896b9 420 ("libsamplerate" ,libsamplerate)
57497c57 421 ("libx11" ,libx11)
99a00446 422 ("libxinerama" ,libxinerama)
57497c57
NG
423 ("libxft" ,libxft)
424 ("libxt" ,libxt)
425 ("mesa" ,mesa)
426 ("mpfi" ,mpfi)
427 ("mpfr" ,mpfr)
428 ("ntl" ,ntl)
429 ("perl" ,perl)
430 ("pari-gp" ,pari-gp)
9f73ac24
NG
431 ("tcsh" ,tcsh)))
432 (native-inputs
6d3896b9
NG
433 `(("bison" ,bison)
434 ("flex" ,flex)
1ceeaa5d 435 ("hevea" ,hevea)
07c3c3ba 436 ("python" ,python-wrapper)
6d3896b9 437 ("readline" ,readline)
a023ec6e 438 ("texlive" ,texlive-tiny)))
57497c57
NG
439 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
440 (synopsis "Computer algebra system")
441 (description
442 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
443maple, mupad and the TI89. It is available as a standalone program (graphic
444or text interfaces) or as a C++ library.")
445 (license license:gpl3+)))
446
d7ab698a
AE
447(define-public flint
448 (package
449 (name "flint")
eefa30c1 450 (version "2.6.3")
a8139e97
TGR
451 (source
452 (origin
453 (method url-fetch)
454 (uri (string-append "http://flintlib.org/flint-" version ".tar.gz"))
455 (sha256
eefa30c1 456 (base32 "1qrf6hzbbmg7mhkhbb0bab8z2xpdnba5cj4kmmf72lzs0457a6nf"))))
d7ab698a 457 (build-system gnu-build-system)
d7c8bcc4
JK
458 (inputs
459 `(("ntl" ,ntl)))
df15d17d 460 (propagated-inputs
d7ab698a 461 `(("gmp" ,gmp)
df15d17d 462 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
d7ab698a 463 (arguments
fa0c1774 464 `(#:parallel-tests? #f ; seems to be necessary on arm
ad11974e 465 #:phases
91430de6 466 (modify-phases %standard-phases
d7c8bcc4
JK
467 (add-before 'configure 'newer-c++
468 (lambda _
469 (substitute* "configure"
470 (("-ansi") ""))
471 #t))
91430de6
AE
472 (replace 'configure
473 (lambda* (#:key inputs outputs #:allow-other-keys)
474 (let ((out (assoc-ref outputs "out"))
475 (gmp (assoc-ref inputs "gmp"))
d7c8bcc4
JK
476 (mpfr (assoc-ref inputs "mpfr"))
477 (ntl (assoc-ref inputs "ntl")))
fa0c1774
TGR
478 ;; Do not pass "--enable-fast-install", which makes the
479 ;; homebrew configure process fail.
50233d95 480 (invoke "./configure"
91430de6
AE
481 (string-append "--prefix=" out)
482 (string-append "--with-gmp=" gmp)
d7c8bcc4
JK
483 (string-append "--with-mpfr=" mpfr)
484 (string-append "--with-ntl=" ntl))
50233d95 485 #t))))))
d7ab698a
AE
486 (synopsis "Fast library for number theory")
487 (description
488 "FLINT is a C library for number theory. It supports arithmetic
489with numbers, polynomials, power series and matrices over many base
490rings, including multiprecision integers and rationals, integers
491modulo n, p-adic numbers, finite fields (prime and non-prime order)
492and real and complex numbers (via the Arb extension library).
493
494Operations that can be performed include conversions, arithmetic,
495GCDs, factoring, solving linear systems, and evaluating special
496functions. In addition, FLINT provides various low-level routines for
497fast arithmetic.")
eefa30c1 498 (license license:lgpl2.1+)
d7ab698a
AE
499 (home-page "http://flintlib.org/")))
500
6b8e8285
AE
501(define-public arb
502 (package
6aa54e23 503 (name "arb")
7dcf5296 504 (version "2.18.1")
6aa54e23
RW
505 (source (origin
506 (method git-fetch)
507 (uri (git-reference
b0e7b699 508 (url "https://github.com/fredrik-johansson/arb")
6aa54e23
RW
509 (commit version)))
510 (file-name (git-file-name name version))
511 (sha256
512 (base32
7dcf5296 513 "15fx3dcbzgwddw9p1nysmx0dbh058afv5m8cj5pdjkcmcl7kw7z9"))))
6aa54e23
RW
514 (build-system gnu-build-system)
515 (propagated-inputs
516 `(("flint" ,flint))) ; flint.h is included by arf.h
517 (inputs
518 `(("gmp" ,gmp)
519 ("mpfr" ,mpfr)))
520 (arguments
521 `(#:phases
522 (modify-phases %standard-phases
523 (replace 'configure
524 (lambda* (#:key inputs outputs #:allow-other-keys)
525 (let ((out (assoc-ref outputs "out"))
526 (flint (assoc-ref inputs "flint"))
527 (gmp (assoc-ref inputs "gmp"))
528 (mpfr (assoc-ref inputs "mpfr")))
faefa2ed
TGR
529 ;; Do not pass "--enable-fast-install", which makes the
530 ;; homebrew configure process fail.
6aa54e23
RW
531 (invoke "./configure"
532 (string-append "--prefix=" out)
533 (string-append "--with-flint=" flint)
534 (string-append "--with-gmp=" gmp)
535 (string-append "--with-mpfr=" mpfr))))))))
536 (synopsis "Arbitrary precision floating-point ball arithmetic")
537 (description
538 "Arb is a C library for arbitrary-precision floating-point ball
6b8e8285
AE
539arithmetic. It supports efficient high-precision computation with
540polynomials, power series, matrices and special functions over the
541real and complex numbers, with automatic, rigorous error control.")
6aa54e23 542 (license license:lgpl2.1+)
faefa2ed 543 (home-page "http://arblib.org")))
6b8e8285 544
1d6589db
AE
545(define-public python-flint
546 (package
547 (name "python-flint")
548 (version "0.3.0")
549 (source (origin
550 (method git-fetch)
551 (uri (git-reference
b0e7b699 552 (url "https://github.com/fredrik-johansson/python-flint")
1d6589db
AE
553 (commit version)))
554 (file-name (git-file-name name version))
555 (sha256
556 (base32
557 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
558 (patches (search-patches "python-flint-includes.patch"))))
559 (build-system python-build-system)
560 (native-inputs
561 `(("python-cython" ,python-cython)))
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)))
564 (inputs
565 `(("arb" ,arb)
566 ("flint" ,flint)))
567 (synopsis "Python module wrapping ARB and FLINT")
568 (description
569 "Python-flint is a Python extension module wrapping FLINT
570(Fast Library for Number Theory) and Arb (arbitrary-precision ball
571arithmetic). It supports integers, rationals, modular integers,
572real and complex ball arithmetic, polynomials and matrices over all
573these types and other mathematical functions.")
574 (license license:expat)
575 (home-page "http://fredrikj.net/python-flint/")))
576
14e6520e
AE
577(define-public ntl
578 (package
579 (name "ntl")
d96ad7fa 580 (version "11.4.3")
14e6520e
AE
581 (source (origin
582 (method url-fetch)
d96ad7fa 583 (uri (string-append "https://shoup.net/ntl/ntl-"
14e6520e 584 version ".tar.gz"))
d96ad7fa
JK
585 (sha256
586 (base32
587 "1lisp3064rch3jaa2wrhy1s9kll7i3ka3d0y6lj6l3l4ckfcrhdp"))
588 (modules '((guix build utils)))
589 (snippet
590 '(begin
591 (delete-file-recursively "src/libtool-origin")
592 #t))))
14e6520e
AE
593 (build-system gnu-build-system)
594 (native-inputs
595 `(("libtool" ,libtool)
596 ("perl" ,perl))) ; for configuration
14e6520e 597 (inputs
d96ad7fa
JK
598 `(("gmp" ,gmp)
599 ("gf2x" ,gf2x)))
14e6520e
AE
600 (arguments
601 `(#:phases
602 (modify-phases %standard-phases
603 (replace 'configure
d96ad7fa 604 (lambda* (#:key inputs outputs #:allow-other-keys)
14e6520e 605 (chdir "src")
d96ad7fa 606 (invoke "./configure"
14e6520e 607 (string-append "PREFIX=" (assoc-ref outputs "out"))
d96ad7fa
JK
608 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
609 ;; set the library prefixes explicitly so that they get
610 ;; embedded in the .la file
611 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
612 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
14e6520e
AE
613 ;; Do not build especially for the build machine.
614 "NATIVE=off"
d96ad7fa
JK
615 "NTL_GF2X_LIB=on"
616 "SHARED=on"))))))
14e6520e
AE
617 (synopsis "C++ library for number theory")
618 (description
619 "NTL is a C++ library providing data structures and algorithms
620for manipulating signed, arbitrary length integers, and for vectors,
621matrices, and polynomials over the integers and over finite fields.")
622 (license license:gpl2+)
d96ad7fa 623 (home-page "https://shoup.net/ntl/")))
14e6520e 624
aae03c48
AE
625(define-public singular
626 (package
627 (name "singular")
33209660 628 (version "4.1.3p2")
f35c3bbb
KK
629 (source
630 (origin
631 (method url-fetch)
632 (uri
633 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
634 "Singular/SOURCES/"
635 (string-join
636 (string-split
637 (string-trim-right version #\p
638 0 (1- (string-length version)))
639 #\.) "-")
640 "/singular-" version ".tar.gz"))
641 (sha256 (base32
33209660 642 "1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
aae03c48
AE
643 (build-system gnu-build-system)
644 (native-inputs
645 `(("doxygen" ,doxygen)
646 ("graphviz" ,graphviz)
647 ("perl" ,perl)))
648 (inputs
649 `(("cddlib" ,cddlib)
650 ("gmp" ,gmp)
651 ("flint" ,flint)
652 ("mpfr" ,mpfr)
653 ("ntl" ,ntl)
654 ("python" ,python-2)
655 ("readline" ,readline)))
656 (arguments
657 `(#:configure-flags
658 (list (string-append "--with-ntl="
659 (assoc-ref %build-inputs "ntl")))))
660 (synopsis "Computer algebra system for polynomial computations")
661 (description
662 "Singular is a computer algebra system for polynomial computations,
663with special emphasis on commutative and non-commutative algebra, algebraic
664geometry and singularity theory.")
665 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
666 ;; libraries with which it links are licensed under lgpl3+, so the
667 ;; combined work becomes gpl3. See COPYING in the source code.
668 (license license:gpl3)
669 (home-page "http://www.singular.uni-kl.de/index.php")))
670
57c9c349
AE
671(define-public gmp-ecm
672 (package
673 (name "gmp-ecm")
7d15cf17 674 (version "7.0.4")
57c9c349 675 (source (origin
7d15cf17
TGR
676 (method url-fetch)
677 ;; Use the ‘Latest version’ link for a stable URI across releases.
678 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
679 "latestfile/160/ecm-" version ".tar.gz"))
680 (sha256 (base32
681 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
57c9c349
AE
682 (build-system gnu-build-system)
683 (inputs
684 `(("gmp" ,gmp)))
685 (arguments
686 `(#:configure-flags '("--enable-shared"
687 ;; Disable specific assembly routines, which depend
688 ;; on the subarchitecture of the build machine,
689 ;; and use gmp instead.
690 "--disable-asm-redc")))
691 (synopsis "Integer factorization library using the elliptic curve method")
692 (description
693 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
694as the P-1 and P+1 algorithms. It provides a library and a stand-alone
695binary.")
696 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
697 ;; so the combined work is under gpl3+.
698 (license license:gpl3+)
699 (home-page "http://ecm.gforge.inria.fr/")))
700
ed9f9a77
LC
701(define-public bc
702 (package
703 (name "bc")
f71f29ca 704 (version "1.07.1")
ed9f9a77
LC
705 (source (origin
706 (method url-fetch)
707 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
708 (sha256
709 (base32
06b2bc55
MO
710 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
711 (patches (search-patches "bc-fix-cross-compilation.patch"))))
ed9f9a77 712 (build-system gnu-build-system)
f71f29ca 713 (native-inputs
06b2bc55
MO
714 `(("automake" ,automake)
715 ("autoconf" ,autoconf)
716 ("ed" ,ed)
f71f29ca
MB
717 ("flex" ,flex)
718 ("texinfo" ,texinfo)))
ed9f9a77 719 (arguments
f71f29ca 720 '(#:configure-flags
06b2bc55
MO
721 (list "--with-readline")
722 #:phases
723 (modify-phases %standard-phases
724 (add-after 'unpack 'autogen
725 (lambda _
726 (invoke "autoreconf" "-vif"))))))
6fd52309 727 (home-page "https://www.gnu.org/software/bc/")
f50d2669 728 (synopsis "Arbitrary precision numeric processing language")
ed9f9a77 729 (description
a22dc0c4
LC
730 "bc is an arbitrary precision numeric processing language. It includes
731an interactive environment for evaluating mathematical statements. Its
732syntax is similar to that of C, so basic usage is familiar. It also includes
733\"dc\", a reverse-polish calculator.")
9f51293c 734 (license license:gpl2+)))
37e6cdcd 735
2a9b10c7
RW
736;; The original kiss-fft does not have a complete build system and does not
737;; build any shared libraries. This is a fork used by Extempore.
738(define-public kiss-fft-for-extempore
739 (package
740 (name "kiss-fft-for-extempore")
741 (version "1.3.0")
742 (source (origin
9774fac4
RW
743 (method git-fetch)
744 (uri (git-reference
b0e7b699 745 (url "https://github.com/extemporelang/kiss_fft")
9774fac4
RW
746 (commit version)))
747 (file-name (git-file-name name version))
2a9b10c7
RW
748 (sha256
749 (base32
9774fac4 750 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
2a9b10c7
RW
751 (build-system cmake-build-system)
752 (arguments `(#:tests? #f)) ; no tests included
39162ee4
RW
753 ;; Extempore refuses to build on architectures other than x86_64
754 (supported-systems '("x86_64-linux"))
2a9b10c7
RW
755 (home-page "https://github.com/extemporelang/kiss_fft")
756 (synopsis "Mixed-radix Fast Fourier Transform")
757 (description
758 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
759that can use fixed or floating data types and can easily be incorporated into
760a C program.")
761 (license license:bsd-3)))
762
37e6cdcd
LC
763(define-public fftw
764 (package
765 (name "fftw")
bdb74478 766 (version "3.3.8")
37e6cdcd
LC
767 (source (origin
768 (method url-fetch)
769 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
770 version".tar.gz"))
771 (sha256
772 (base32
bdb74478 773 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
37e6cdcd
LC
774 (build-system gnu-build-system)
775 (arguments
65bb2279 776 `(#:configure-flags
69d5909e
MW
777 '("--enable-shared" "--enable-openmp" "--enable-threads"
778 ,@(let ((system (or (%current-target-system) (%current-system))))
779 ;; Enable SIMD extensions for codelets. See details at:
780 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
781 (cond
782 ((string-prefix? "x86_64" system)
783 '("--enable-sse2" "--enable-avx" "--enable-avx2"
784 "--enable-avx512" "--enable-avx-128-fma"))
785 ((string-prefix? "i686" system)
786 '("--enable-sse2"))
787 ((string-prefix? "aarch64" system)
788 ;; Note that fftw supports NEON on 32-bit ARM only when
789 ;; compiled for single-precision.
790 '("--enable-neon"))
791 (else
792 '())))
65bb2279
EB
793 ;; By default '-mtune=native' is used. However, that may cause the
794 ;; use of ISA extensions (e.g. AVX) that are not necessarily
795 ;; available on the user's machine when that package is built on a
796 ;; different machine.
797 "ax_cv_c_flags__mtune_native=no")))
37e6cdcd
LC
798 (native-inputs `(("perl" ,perl)))
799 (home-page "http://fftw.org")
800 (synopsis "Computing the discrete Fourier transform")
801 (description
802 "FFTW is a C subroutine library for computing the discrete Fourier
803transform (DFT) in one or more dimensions, of arbitrary input size, and of
804both real and complex data (as well as of even/odd data---i.e. the discrete
805cosine/ sine transforms or DCT/DST).")
9f51293c 806 (license license:gpl2+)))
7569c5cb
EB
807
808(define-public fftwf
809 (package (inherit fftw)
810 (name "fftwf")
811 (arguments
812 (substitute-keyword-arguments (package-arguments fftw)
69d5909e
MW
813 ((#:configure-flags fftw-configure-flags)
814 `(cons* "--enable-single"
815 ,@(if (string-prefix? "arm" (or (%current-target-system)
816 (%current-system)))
817 ;; fftw supports NEON on 32-bit ARM only when compiled
818 ;; for single-precision, so add it here.
819 '("--enable-neon")
820 '())
821 ,fftw-configure-flags))))
7569c5cb
EB
822 (description
823 (string-append (package-description fftw)
824 " Single-precision version."))))
e5c66f8c
EB
825
826(define-public fftw-openmpi
827 (package (inherit fftw)
828 (name "fftw-openmpi")
829 (inputs
830 `(("openmpi" ,openmpi)
831 ,@(package-inputs fftw)))
832 (arguments
833 (substitute-keyword-arguments (package-arguments fftw)
834 ((#:configure-flags cf)
eb6785cf
EB
835 `(cons "--enable-mpi" ,cf))
836 ((#:phases phases '%standard-phases)
837 `(modify-phases ,phases
838 (add-before 'check 'mpi-setup
839 ,%openmpi-setup)))))
e5c66f8c
EB
840 (description
841 (string-append (package-description fftw)
842 " With OpenMPI parallelism support."))))
8f4b1dfb 843
c8d99608
RW
844(define-public java-la4j
845 (package
846 (name "java-la4j")
847 (version "0.6.0")
848 (source (origin
849 (method git-fetch)
850 (uri (git-reference
b0e7b699 851 (url "https://github.com/vkostyukov/la4j")
c8d99608
RW
852 (commit version)))
853 (file-name (string-append name "-" version "-checkout"))
854 (sha256
855 (base32
856 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
857 (build-system ant-build-system)
858 (arguments
859 `(#:jar-name "la4j.jar"
860 #:jdk ,icedtea-8
861 #:test-exclude (list "**/Abstract*.java"
862 "**/MatrixTest.java"
863 "**/DenseMatrixTest.java"
864 "**/SparseMatrixTest.java"
865 "**/VectorTest.java"
866 "**/SparseVectorTest.java"
867 "**/DenseVectorTest.java")))
868 (native-inputs
869 `(("java-junit" ,java-junit)
870 ("java-hamcrest-core" ,java-hamcrest-core)))
871 (home-page "http://la4j.org/")
872 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
873 (description "The la4j library is a Java library that provides Linear
874Algebra primitives (matrices and vectors) and algorithms. The key features of
875the la4j library are:
876
877@itemize
878@item No dependencies and tiny size
879@item Fluent object-oriented/functional API
880@item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
881@item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
882@item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
883@item MatrixMarket/CSV IO formats support for matrices and vectors
884@end itemize\n")
885 (license license:asl2.0)))
886
24074b0b
RW
887(define-public java-jlargearrays
888 (package
889 (name "java-jlargearrays")
890 (version "1.6")
891 (source (origin
892 (method url-fetch)
9f5eeb87
BH
893 (uri (string-append "https://repo1.maven.org/maven2/"
894 "pl/edu/icm/JLargeArrays/"
24074b0b
RW
895 version "/JLargeArrays-" version
896 "-sources.jar"))
897 (file-name (string-append name "-" version ".jar"))
898 (sha256
899 (base32
900 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
901 (build-system ant-build-system)
902 (arguments
903 `(#:jar-name "jlargearrays.jar"
904 #:tests? #f ; tests are not included in the release archive
905 #:jdk ,icedtea-8))
906 (propagated-inputs
907 `(("java-commons-math3" ,java-commons-math3)))
908 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
909 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
910 (description "JLargeArrays is a Java library of one-dimensional arrays
911that can store up to 263 elements.")
912 (license license:bsd-2)))
913
4e92911c
RW
914(define-public java-jtransforms
915 (package
916 (name "java-jtransforms")
917 (version "3.1")
918 (source (origin
919 (method url-fetch)
4c877704
BH
920 (uri (string-append "https://repo1.maven.org/maven2/"
921 "com/github/wendykierp/JTransforms/"
4e92911c
RW
922 version "/JTransforms-" version "-sources.jar"))
923 (sha256
924 (base32
925 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
926 (build-system ant-build-system)
927 (arguments
928 `(#:jar-name "jtransforms.jar"
929 #:tests? #f ; tests are not included in the release archive
930 #:jdk ,icedtea-8))
931 (propagated-inputs
932 `(("java-commons-math3" ,java-commons-math3)
933 ("java-jlargearrays" ,java-jlargearrays)))
934 (home-page "https://github.com/wendykierp/JTransforms")
935 (synopsis "Multithreaded FFT library written in pure Java")
936 (description "JTransforms is a multithreaded FFT library written in pure
937Java. Currently, four types of transforms are available: @dfn{Discrete
938Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
939Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
940 (license license:bsd-2)))
941
feba2c97
VL
942(define-public lmfit
943 (package
944 (name "lmfit")
945 (version "8.2.2")
946 (source (origin
947 (method git-fetch)
948 (uri (git-reference
949 (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
950 (commit (string-append "v" version))))
951 (file-name (git-file-name name version))
952 (sha256
953 (base32
954 "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
955 (build-system cmake-build-system)
956 (native-inputs
957 `(("perl" ,perl))) ; for pod2man
958 (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
959 (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
960 (description "lmfit is a C library for Levenberg-Marquardt least-squares
961minimization and curve fitting. It is mature code, based on decades-old
962algorithms from the FORTRAN library MINPACK.")
963 (license license:bsd-2)))
964
d0337a22
VM
965(define-public symengine
966 (package
967 (name "symengine")
968 (version "0.6.0")
969 (source
970 (origin
af0307a0
NG
971 (method git-fetch)
972 (uri (git-reference
b0e7b699 973 (url "https://github.com/symengine/symengine")
af0307a0
NG
974 (commit (string-append "v" version))))
975 (file-name (git-file-name name version))
976 (sha256
977 (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
d0337a22
VM
978 (build-system cmake-build-system)
979 (arguments
af0307a0
NG
980 '(#:configure-flags
981 ;; These are the suggested build options in the README.
d0337a22
VM
982 '("-DCMAKE_BUILD_TYPE=Release"
983 "-DWITH_GMP=on"
984 "-DWITH_MPFR=on"
985 "-DWITH_MPC=on"
986 "-DINTEGER_CLASS=flint"
987 "-DWITH_LLVM=on"
988 "-DWITH_SYMENGINE_THREAD_SAFE=on"
af0307a0 989 "-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
d0337a22
VM
990 (native-inputs
991 `(("llvm" ,llvm)))
992 (inputs
993 `(("flint" ,flint)
994 ("gmp" ,gmp)
995 ("mpc" ,mpc)
996 ("mpfr" ,mpfr)))
997 (home-page "https://github.com/symengine/symengine")
998 (synopsis "Fast symbolic manipulation library")
af0307a0
NG
999 (description
1000 "SymEngine is a standalone fast C++ symbolic manipulation library.
1001Optional thin wrappers allow usage of the library from other languages.")
1002 (license (list license:expat ;SymEngine
1003 license:bsd-3)))) ;3rd party code
d0337a22 1004
8f4b1dfb
LC
1005(define-public eigen
1006 (package
1007 (name "eigen")
2d2ac742 1008 (version "3.3.8")
8f4b1dfb
LC
1009 (source (origin
1010 (method url-fetch)
57797b85
EF
1011 (uri (list
1012 (string-append "https://bitbucket.org/eigen/eigen/get/"
1013 version ".tar.bz2")
1014 (string-append "mirror://debian/pool/main/e/eigen3/eigen3_"
1015 version ".orig.tar.bz2")))
8f4b1dfb
LC
1016 (sha256
1017 (base32
2d2ac742 1018 "1vxrsncfnkyq6gwxpsannpryp12mk7lc8f42ybvz3saf7icwc582"))
2abcc935 1019 (file-name (string-append name "-" version ".tar.bz2"))
ba902a15
TGR
1020 (patches (search-patches "eigen-remove-openmp-error-counting.patch"
1021 "eigen-stabilise-sparseqr-test.patch"))
8f4b1dfb
LC
1022 (modules '((guix build utils)))
1023 (snippet
1024 ;; There are 3 test failures in the "unsupported" directory,
1025 ;; but maintainers say it's a known issue and it's unsupported
1026 ;; anyway, so just skip them.
1137d85b 1027 '(begin
44884a9d
RW
1028 (substitute* "unsupported/CMakeLists.txt"
1029 (("add_subdirectory\\(test.*")
1030 "# Do not build the tests for unsupported features.\n"))
6cbee49d 1031 #t))))
8f4b1dfb
LC
1032 (build-system cmake-build-system)
1033 (arguments
1034 '(;; Turn off debugging symbols to save space.
1035 #:build-type "Release"
1036
354f4fe2 1037 #:phases (modify-phases %standard-phases
ef8742ea 1038 (replace 'check
354f4fe2 1039 (lambda _
354f4fe2
LC
1040 (let* ((cores (parallel-job-count))
1041 (dash-j (format #f "-j~a" cores)))
1137d85b 1042 (setenv "EIGEN_SEED" "1") ;for reproducibility
ef8742ea
LC
1043 ;; First build the tests, in parallel. See
1044 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
fbe9c80f 1045 (invoke "make" "buildtests" dash-j)
8f4b1dfb 1046
fbe9c80f
TGR
1047 ;; Then run 'CTest' with -V so we get more
1048 ;; details upon failure.
1049 (invoke "ctest" "-V" dash-j)))))))
eeb8b0e6 1050 (home-page "https://eigen.tuxfamily.org")
8f4b1dfb
LC
1051 (synopsis "C++ template library for linear algebra")
1052 (description
1053 "Eigen is a C++ template library for linear algebra: matrices, vectors,
1054numerical solvers, and related algorithms. It provides an elegant API based
1055on \"expression templates\". It is versatile: it supports all matrix sizes,
1056all standard numeric types, various matrix decompositions and geometry
1057features, and more.")
1058
1059 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
1060 ;; See 'COPYING.README' for details.
9f51293c 1061 (license license:mpl2.0)))
70770b93 1062
697eb65d
RW
1063(define-public eigen-for-tensorflow
1064 (let ((changeset "fd6845384b86")
1065 (revision "1"))
1066 (package (inherit eigen)
1067 (name "eigen-for-tensorflow")
1068 (version (string-append "3.3.5-" revision "." changeset))
1069 (source (origin
1070 (method hg-fetch)
1071 (uri (hg-reference
1072 (url "https://bitbucket.org/eigen/eigen")
1073 (changeset changeset)))
1074 (sha256
1075 (base32
1076 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
1077 (file-name (string-append name "-" version "-checkout"))
1078 (modules '((guix build utils)))
1079 (snippet
1080 ;; There are 3 test failures in the "unsupported" directory,
1081 ;; but maintainers say it's a known issue and it's unsupported
1082 ;; anyway, so just skip them.
1083 '(begin
1084 (substitute* "unsupported/CMakeLists.txt"
1085 (("add_subdirectory\\(test.*")
1086 "# Do not build the tests for unsupported features.\n"))
1087 #t)))))))
1088
70770b93
FT
1089(define-public xtensor
1090 (package
1091 (name "xtensor")
4e6568ce 1092 (version "0.20.10")
70770b93 1093 (source (origin
e1ecaa83
KK
1094 (method git-fetch)
1095 (uri (git-reference
7c30e234 1096 (url "https://github.com/xtensor-stack/xtensor")
e1ecaa83 1097 (commit version)))
70770b93
FT
1098 (sha256
1099 (base32
4e6568ce 1100 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
e1ecaa83 1101 (file-name (git-file-name name version))))
70770b93
FT
1102 (build-system cmake-build-system)
1103 (native-inputs
1104 `(("googletest" ,googletest)
1105 ("xtl" ,xtl)))
1106 (arguments
1107 `(#:configure-flags
1108 '("-DBUILD_TESTS=ON")
1109 #:test-target "xtest"))
7c30e234 1110 (home-page "https://xtensor.readthedocs.io/en/latest/")
70770b93
FT
1111 (synopsis "C++ tensors with broadcasting and lazy computing")
1112 (description "xtensor is a C++ library meant for numerical analysis with
1113multi-dimensional array expressions.
1114
1115xtensor provides:
1116@itemize
1117@item an extensible expression system enabling lazy broadcasting.
1118@item an API following the idioms of the C++ standard library.
1119@item tools to manipulate array expressions and build upon xtensor.
1120@end itemize")
1121 (license license:bsd-3)))
3f074a21
AE
1122
1123(define-public gap
1124 (package
1125 (name "gap")
42ed5317 1126 (version "4.11.0")
3f074a21
AE
1127 (source
1128 (origin
1129 (method url-fetch)
42ed5317 1130 (uri (string-append "https://files.gap-system.org/gap-"
3f074a21
AE
1131 (version-major+minor version)
1132 "/tar.bz2/gap-"
1133 version
1134 ".tar.bz2"))
1135 (sha256
42ed5317 1136 (base32 "00l6hvy4iggnlrib4vp805sxdm3j7n3hzpv5zs9hbiiavh80l1xz"))
3f074a21
AE
1137 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1138 (snippet
1139 '(begin
1140 ;; Delete the external gmp and zlib libraries
1141 ;; and a subdirectory not needed for our build.
1142 (for-each delete-file-recursively
1143 '("extern" "hpcgap"))
1144 ;; Delete a failing test.
1145 ;; FIXME: This might be fixed in the next release, see
1146 ;; https://github.com/gap-system/gap/issues/3292
1147 (delete-file "tst/testinstall/dir.tst")
42ed5317
AE
1148 ;; Delete all packages except for a fixed list,
1149 ;; given by their names up to version numbers.
3f074a21
AE
1150 (with-directory-excursion "pkg"
1151 (for-each delete-file-recursively
42ed5317
AE
1152 (lset-difference
1153 (lambda (all keep) (string-prefix? keep all))
1154 (scandir ".")
3f074a21
AE
1155 '("." ".."
1156 ;; Necessary packages.
42ed5317
AE
1157 "GAPDoc-"
1158 "primgrp-"
1159 "SmallGrp-" ; artistic2.0
1160 "transgrp" ; artistic2.0 for data,
1161 ; gpl2 or gpl3 for code
1162 ;; Recommended package.
1163 "io-" ; gpl3+
3f074a21
AE
1164 ;; Optional packages, searched for at start,
1165 ;; and their depedencies.
42ed5317
AE
1166 "alnuth-"
1167 "autpgrp-"
1168 "crisp-" ; bsd-2
1169 "ctbllib" ; gpl3+, clarified in the next release;
1170 ; see
1171 ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
1172 "FactInt-"
3f074a21 1173 "fga"
42ed5317
AE
1174 "irredsol-" ; bsd-2
1175 "laguna-"
1176 "polenta-"
1177 "polycyclic-"
1178 "radiroot-"
1179 "resclasses-"
1180 "sophus-"
1181 "tomlib-"
1182 "utils-"))))
3f074a21
AE
1183 #t))))
1184 (build-system gnu-build-system)
1185 (inputs
1186 `(("gmp" ,gmp)
42ed5317 1187 ("readline" ,readline)
3f074a21
AE
1188 ("zlib" ,zlib)))
1189 (arguments
bf95a142
AE
1190 `(#:modules ((ice-9 ftw)
1191 (srfi srfi-26)
1192 (guix build gnu-build-system)
1193 (guix build utils))
1194 #:phases
3f074a21
AE
1195 (modify-phases %standard-phases
1196 (add-after 'build 'build-packages
1197 ;; Compile all packages that have not been deleted by the
1198 ;; code snippet above.
1199 (lambda _
1200 (setenv "CONFIG_SHELL" (which "bash"))
1201 (with-directory-excursion "pkg"
1202 (invoke "../bin/BuildPackages.sh")
1203 #t)))
1204 (add-after 'build-packages 'build-doc
1205 ;; The documentation is bundled, but we create it from source.
1206 (lambda _
1207 (with-directory-excursion "doc"
1208 (invoke "./make_doc"))
1209 #t))
3f074a21
AE
1210 (replace 'install
1211 (lambda* (#:key outputs #:allow-other-keys)
1212 (let* ((out (assoc-ref outputs "out"))
1213 (bin (string-append out "/bin"))
1214 (prog (string-append bin "/gap"))
1215 (prog-real (string-append bin "/.gap-real"))
42ed5317 1216 (share (string-append out "/share/gap")))
3f074a21
AE
1217 ;; Install only the gap binary; the gac compiler is left
1218 ;; for maybe later. "Wrap" it in a shell script that calls
1219 ;; the binary with the correct parameter.
42ed5317
AE
1220 ;; The make target install-bin is supposed to do that, but
1221 ;; is not currently working.
3f074a21
AE
1222 (mkdir-p bin)
1223 (copy-file "gap" prog-real)
1224 (call-with-output-file prog
1225 (lambda (port)
1226 (format port
1227 "#!~a~%exec ~a -l ~a \"$@\"~%"
1228 (which "bash")
1229 prog-real
1230 share)))
1231 (chmod prog #o755)
42ed5317
AE
1232 ;; Install the headers and library, which are needed by Sage.
1233 (invoke "make" "install-headers")
1234 (invoke "make" "install-libgap")
3f074a21
AE
1235 ;; Remove information on the build directory from sysinfo.gap.
1236 (substitute* "sysinfo.gap"
1237 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1238 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1239 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
42ed5317
AE
1240 (invoke "make" "install-gaproot")
1241 ;; Copy the directory of compiled packages; the make target
1242 ;; install-pkg is currently empty.
1243 (copy-recursively "pkg" (string-append share "/pkg")))
3f074a21
AE
1244 #t)))))
1245 (home-page "https://www.gap-system.org/")
1246 (synopsis
1247 "System for computational group theory")
1248 (description
1249 "GAP is a system for computational discrete algebra, with particular
1250emphasis on computational group theory. It provides a programming language,
1251a library of thousands of functions implementing algebraic algorithms
1252written in the GAP language as well as large data libraries of algebraic
1253objects.")
1254 ;; Some packages have different licenses (effectively forcing the
1255 ;; combined work to be licensed as gpl3+); if this is the case, this
1256 ;; is mentioned above next to their name.
1257 ;; Some packages have no license mentioned explicitly; supposedly this
1258 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1259 ;; safe side, we drop them for now.
1260 (license license:gpl2+)))
f0fbb31d
AE
1261
1262(define-public givaro
1263 (package
1264 (name "givaro")
1265 (version "4.1.1")
1266 (source (origin
1267 (method git-fetch)
1268 (uri (git-reference
1269 (url "https://github.com/linbox-team/givaro")
1270 (commit (string-append "v" version))))
1271 (file-name (git-file-name name version))
1272 (sha256
1273 (base32
1274 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1275 (build-system gnu-build-system)
1276 (native-inputs
1277 `(("autoconf" ,autoconf)
1278 ("automake" ,automake)
1279 ("libtool" ,libtool)))
1280 (propagated-inputs
1281 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
f0fbb31d
AE
1282 (synopsis "Algebraic computations with exact rings and fields")
1283 (description
1284 "Givaro is a C++ library implementing the basic arithmetic of various
1285algebraic objects: prime fields, extension fields, finite fields, finite
1286rings, polynomials, algebraic numbers, arbitrary precision integers and
1287rationals (C++ wrappers over gmp), fixed precision integers. It also
1288provides data-structures and templated classes for the manipulation of
1289compound objects, such as vectors, matrices and univariate polynomials.")
1290 (license license:cecill-b)
1291 (home-page "https://github.com/linbox-team/givaro")))
4bf9cb40
AE
1292
1293(define-public fflas-ffpack
1294 (package
1295 (name "fflas-ffpack")
1296 (version "2.4.3")
1297 (source (origin
1298 (method git-fetch)
1299 (uri (git-reference
1300 (url "https://github.com/linbox-team/fflas-ffpack")
1301 (commit version)))
1302 (file-name (git-file-name name version))
1303 (sha256
1304 (base32
1305 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1306 (build-system gnu-build-system)
1307 (native-inputs
1308 `(("autoconf" ,autoconf)
1309 ("automake" ,automake)
1310 ("libtool" ,libtool)
1311 ("pkg-config" ,pkg-config)))
1312 (inputs
1313 `(("openblas" ,openblas)))
1314 (propagated-inputs
1315 `(("givaro" ,givaro))) ; required according to the .pc file
1316 (arguments
1317 `(#:configure-flags
1318 (list (string-append "--with-blas-libs="
1319 (assoc-ref %build-inputs "openblas")
778d6b52 1320 "/lib/libopenblas.so"))))
4bf9cb40
AE
1321 (synopsis "C++ library for linear algebra over finite fields")
1322 (description
1323 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1324operations over a finite field.
1325FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1326of a subset of routines of the numerical BLAS; it also supports sparse
1327matrix-vector products.
1328FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1329library to provide functionalities of higher level, using the kernel
1330of a BLAS. Additionally, it provides routines specific to exact linear
1331algebra, such as the row echelon form.")
1332 (license license:lgpl2.1+)
1333 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
a612f866
AE
1334
1335(define-public linbox
1336 (package
1337 (name "linbox")
1338 (version "1.6.3")
1339 (source (origin
1340 (method git-fetch)
1341 (uri (git-reference
1342 (url "https://github.com/linbox-team/linbox")
1343 (commit (string-append "v" version))))
1344 (file-name (git-file-name name version))
1345 (sha256
1346 (base32
781d03f1
JK
1347 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
1348 (patches (search-patches "linbox-fix-pkgconfig.patch"))))
a612f866
AE
1349 (build-system gnu-build-system)
1350 (native-inputs
1351 `(("autoconf" ,autoconf)
1352 ("automake" ,automake)
1353 ("libtool" ,libtool)
1354 ("pkg-config" ,pkg-config)))
781d03f1 1355 (propagated-inputs
a612f866 1356 `(("fflas-ffpack" ,fflas-ffpack)))
a612f866
AE
1357 (synopsis "C++ library for linear algebra over exact rings")
1358 (description
1359 "LinBox is a C++ template library for exact linear algebra computation
1360with dense, sparse, and structured matrices over the integers and over
1361finite fields.")
1362 (license license:lgpl2.1+)
1363 (home-page "https://linbox-team.github.io/linbox/")))
37edfb0f
AE
1364
1365(define-public m4ri
1366 (package
1367 (name "m4ri")
1368 (version "20140914")
1369 (source (origin
1370 (method git-fetch)
1371 (uri (git-reference
1372 (url "https://bitbucket.org/malb/m4ri")
1373 (commit (string-append "release-" version))))
1374 (file-name (git-file-name name version))
1375 (sha256
1376 (base32
1377 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1378 (build-system gnu-build-system)
1379 (native-inputs
1380 `(("autoconf" ,autoconf)
1381 ("automake" ,automake)
1382 ("libtool" ,libtool)
1383 ("pkg-config" ,pkg-config)))
1384 (inputs
1385 `(("libpng" ,libpng)))
1386 (synopsis "Arithmetic of dense matrices over F_2")
1387 (description "M4RI is a library for fast arithmetic with dense matrices
1388over F2. The name M4RI comes from the first implemented algorithm: The
1389Method of the Four Russians inversion algorithm published by Gregory Bard.
1390This algorithm in turn is named after the Method of the Four Russians
1391multiplication algorithm.")
1392 (license license:gpl2+)
1393 (home-page "https://bitbucket.org/malb/m4ri/")))
ab398380 1394
75a73bb0
NG
1395(define-public symmetrica
1396 (package
1397 (name "symmetrica")
1398 (version "2.0")
1399 (source (origin
1400 (method url-fetch/tarbomb)
1401 (uri (let ((v (string-join (string-split version #\.) "_")))
1402 (string-append "http://www.algorithm.uni-bayreuth.de/"
1403 "en/research/SYMMETRICA/"
1404 "SYM" v "_tar.gz")))
1405 (sha256
1406 (base32
1407 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1408 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1409 (patches (search-patches "symmetrica-bruch.patch"
1410 "symmetrica-int32.patch"
1411 "symmetrica-return_values.patch"
1412 "symmetrica-sort_sum_rename.patch"))))
1413 (build-system gnu-build-system)
1414 (arguments
1415 `(#:tests? #f ;no test
1416 #:phases
1417 (modify-phases %standard-phases
1418 (add-after 'unpack 'fix-makefile
1419 (lambda _
1420 (substitute* "makefile"
e6eafd42 1421 (("cc -c") "gcc -c -fPIC"))
75a73bb0
NG
1422 #t))
1423 (add-after 'fix-makefile 'turn-off-banner
1424 (lambda _
1425 (substitute* "de.c"
1426 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1427 #t))
1428 (delete 'configure) ;no configure script
1429 (replace 'install ;no install target
1430 (lambda* (#:key outputs #:allow-other-keys)
1431 (let* ((out (assoc-ref outputs "out"))
1432 (lib (string-append out "/lib"))
1433 (inc (string-append out "/include/symmetrica"))
1434 (doc (string-append out "/share/doc/symmetrica-" ,version))
1435 (static "libsymmetrica.a"))
1436 ;; Build static library.
1437 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1438 (invoke "ranlib" static)
1439 ;; Install static library and headers.
1440 (for-each (lambda (f) (install-file f inc))
1441 (find-files "." "\\.h$"))
1442 (install-file "libsymmetrica.a" lib)
1443 ;; Install documentation.
1444 (for-each (lambda (f) (install-file f doc))
1445 (find-files "." "\\.doc$"))
1446 #t))))))
1447 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1448 (synopsis "Combinatoric C Library")
1449 (description "Symmetrica is a library for combinatorics. It has support
1450for the representation theory of the symmetric group and related groups,
1451combinatorics of tableaux, symmetric functions and polynomials, Schubert
1452polynomials, and the representation theory of Hecke algebras of type A_n.")
1453 (license license:public-domain)))
6cbedbd2
AE
1454
1455(define-public m4rie
1456 (package
1457 (name "m4rie")
1458 (version "20150908")
1459 (source (origin
1460 (method git-fetch)
1461 (uri (git-reference
1462 (url "https://bitbucket.org/malb/m4rie")
1463 (commit (string-append "release-" version))))
1464 (file-name (git-file-name name version))
1465 (sha256
1466 (base32
1467 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1468 (build-system gnu-build-system)
1469 (native-inputs
1470 `(("autoconf" ,autoconf)
1471 ("automake" ,automake)
1472 ("libtool" ,libtool)))
1473 (inputs
1474 `(("m4ri" ,m4ri)))
1475 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1476 (description "M4RI is a library for fast arithmetic with dense matrices
1477over finite fields of characteristic 2. So it extends the functionality
1478of M4RI from F_2 to F_{2^e}.")
1479 (license license:gpl2+)
1480 (home-page "https://bitbucket.org/malb/m4rie/")))
66c67e7b
AE
1481
1482(define-public eclib
1483 (package
1484 (name "eclib")
9a5f35fe 1485 (version "20190909")
66c67e7b
AE
1486 (source (origin
1487 (method git-fetch)
1488 (uri (git-reference
1489 (url "https://github.com/JohnCremona/eclib/")
1490 (commit (string-append "v" version))))
1491 (file-name (git-file-name name version))
1492 (sha256
1493 (base32
9a5f35fe 1494 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
66c67e7b
AE
1495 (build-system gnu-build-system)
1496 (native-inputs
1497 `(("autoconf" ,autoconf)
1498 ("automake" ,automake)
1499 ("libtool" ,libtool)))
1500 (inputs
d96ad7fa 1501 `(("ntl" ,ntl)
66c67e7b
AE
1502 ("pari-gp" ,pari-gp)))
1503 (synopsis "Ranks of elliptic curves and modular symbols")
1504 (description "The eclib package includes mwrank (for 2-descent on
1505elliptic curves over Q) and modular symbol code; it has been written by
1506John Cremona to compute his elliptic curve database.")
1507 (license license:gpl2+)
1508 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1509 "J.E.Cremona/mwrank/index.html"))))
197ebc36
AE
1510
1511(define-public lrcalc
1512 (package
1513 (name "lrcalc")
1514 (version "1.2")
1515 (source (origin
1516 (method git-fetch)
1517 (uri (git-reference
1518 (url "https://bitbucket.org/asbuch/lrcalc")
1519 (commit (string-append "lrcalc-" version))))
1520 (file-name (git-file-name name version))
1521 (sha256
1522 (base32
88f913e8
AE
1523 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1524 (patches (search-patches "lrcalc-includes.patch"))))
197ebc36
AE
1525 (build-system gnu-build-system)
1526 (native-inputs
1527 `(("autoconf" ,autoconf)
1528 ("automake" ,automake)
1529 ("libtool" ,libtool)))
1530 (arguments
1531 `(#:phases
1532 (modify-phases %standard-phases
1533 (add-before 'build 'fix-permission
1534 (lambda _
1535 (chmod "lrcalc.maple.src" #o644)
1536 #t)))))
1537 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1538 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1539program designed to compute Littlewood-Richardson coefficients. It computes
1540single Littlewood-Richardson coefficients, products of Schur functions, or
1541skew Schur functions. In addition it computes products in the small quantum
1542cohomology ring of a Grassmann variety. The software package also includes
1543a program that performs fast computation of the more general multiplicative
1544structure constants of Schubert polynomials.")
1545 (license license:gpl2+)
1e30dff3 1546 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
eacf2983
AE
1547
1548(define-public iml
1549 (package
1550 (name "iml")
1551 (version "1.0.5")
1552 (source
1553 (origin
1554 (method url-fetch)
1555 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1556 version ".tar.bz2"))
1557 (sha256
1558 (base32
1559 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1560 (build-system gnu-build-system)
1561 (inputs
1628d57b 1562 `(("gmp" ,gmp)
eacf2983
AE
1563 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1564 ; mentions ATLAS in particular
1565 (arguments
1566 `(#:configure-flags
1567 (list
c68ec87c 1568 "--enable-shared"
eacf2983
AE
1569 (string-append "--with-gmp-include="
1570 (assoc-ref %build-inputs "gmp") "/include")
1571 (string-append "--with-gmp-lib="
1572 (assoc-ref %build-inputs "gmp") "/lib")
1573 "--with-cblas=-lopenblas"
1574 (string-append "--with-cblas-include="
1575 (assoc-ref %build-inputs "cblas") "/include")
1576 (string-append "--with-cblas-lib="
1577 (assoc-ref %build-inputs "cblas") "/lib"))))
1578 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1579 (synopsis
1580 "Solver for systems of linear equations over the integers")
1581 (description
1582 "IML is a C library implementing algorithms for computing exact
1583solutions to dense systems of linear equations over the integers.
1584Currently, IML provides the following functionality:
1585
1586@itemize
1587@item Nonsingular rational system solving:
1588compute the unique rational solution X to the system AX=B, where A and B
1589are integer matrices, A nonsingular.
1590@item Compute the right nullspace or kernel of an integer matrix.
1591@item Certified linear system solving:
1592compute a minimal denominator solution x to a system Ax=b, where b is an
1593integer vector and A is an integer matrix with arbitrary shape and
1594rank profile.
1595@end itemize
1596
1597In addition, IML provides some low level routines for a variety of mod p
1598matrix operations: computing the row-echelon form, determinant, rank
1599profile, and inverse of a mod p matrix. These mod p routines are not
1600general purpose; they require that p satisfy some preconditions based on
1601the dimension of the input matrix (usually p should be prime and should be
1602no more than about 20 bits long).")
1603 (license license:bsd-3)))