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