1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages algebra)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages autotools)
31 #:use-module (gnu packages bison)
32 #:use-module (gnu packages check)
33 #:use-module (gnu packages compression)
34 #:use-module (gnu packages cpp)
35 #:use-module (gnu packages documentation)
36 #:use-module (gnu packages ed)
37 #:use-module (gnu packages flex)
38 #:use-module (gnu packages fltk)
39 #:use-module (gnu packages gl)
40 #:use-module (gnu packages graphviz)
41 #:use-module (gnu packages image)
42 #:use-module (gnu packages java)
43 #:use-module (gnu packages maths)
44 #:use-module (gnu packages mpi)
45 #:use-module (gnu packages multiprecision)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages pulseaudio)
49 #:use-module (gnu packages python)
50 #:use-module (gnu packages python-xyz)
51 #:use-module (gnu packages readline)
52 #:use-module (gnu packages shells)
53 #:use-module (gnu packages tex)
54 #:use-module (gnu packages texinfo)
55 #:use-module (gnu packages xiph)
56 #:use-module (gnu packages xorg)
57 #:use-module (guix build-system ant)
58 #:use-module (guix build-system gnu)
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system python)
61 #:use-module (guix download)
62 #:use-module (guix git-download)
63 #:use-module (guix hg-download)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (guix packages)
66 #:use-module (guix utils))
76 "http://www.multiprecision.org/downloads/mpfrcx-"
80 "1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
81 (build-system gnu-build-system)
85 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
86 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
88 "Mpfrcx is a library for the arithmetic of univariate polynomials over
89 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
90 on the rounding. For the time being, only the few functions needed to
91 implement the floating point approach to complex multiplication are
92 implemented. On the other hand, these comprise asymptotically fast
93 multiplication routines such as Toom–Cook and the FFT.")
94 (license license:lgpl3+)
95 (home-page "http://mpfrcx.multiprecision.org/")))
104 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
108 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
109 (build-system gnu-build-system)
110 (synopsis "Arithmetic of polynomials over binary finite fields")
112 "The gf2x library provides arithmetic of polynomials over finite fields
113 of characteristic 2. It implements the multiplication, squaring and
114 greatest common divisor operations.")
115 (license license:gpl3+)
116 (home-page "https://gforge.inria.fr/projects/gf2x/")))
125 "http://www.multiprecision.org/cm/download/cm-"
129 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
130 (build-system gnu-build-system)
133 ("zlib" ,zlib))) ; Header files included from cm_common.h.
135 `(("pari-gp" ,pari-gp)))
136 (synopsis "CM constructions for elliptic curves")
138 "The CM software implements the construction of ring class fields of
139 imaginary quadratic number fields and of elliptic curves with complex
140 multiplication via floating point approximations. It consists of libraries
141 that can be called from within a C program and of executable command
143 (license license:gpl3+)
144 (home-page "http://cm.multiprecision.org/")))
153 (url "https://github.com/fplll/fplll.git")
155 (file-name (git-file-name name version))
158 "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg"))))
159 (build-system gnu-build-system)
161 `(("autoconf" ,autoconf)
162 ("automake" ,automake)
163 ("libtool" ,libtool)))
167 (home-page "https://github.com/fplll/fplll")
168 (synopsis "Library for LLL-reduction of euclidean lattices")
170 "fplll contains implementations of several lattice algorithms.
171 The implementation relies on floating-point orthogonalization, and LLL
172 is central to the code, hence the name.
174 It includes implementations of floating-point LLL reduction
175 algorithms, offering different speed/guarantees ratios. It contains
176 a @emph{wrapper} choosing the estimated best sequence of variants in
177 order to provide a guaranteed output as fast as possible. In the case
178 of the wrapper, the succession of variants is oblivious to the user.
180 It includes an implementation of the BKZ reduction algorithm,
181 including the BKZ-2.0 improvements (extreme enumeration
182 pruning, pre-processing of blocks, early termination). Additionally,
183 Slide reduction and self dual BKZ are supported.
185 It also includes a floating-point implementation of the
186 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
187 vector. For the same task, the GaussSieve algorithm is also available
188 in fplll. Finally, it contains a variant of the enumeration algorithm
189 that computes a lattice vector closest to a given vector belonging to
190 the real span of the lattice.")
191 (license license:lgpl2.1+)))
193 (define-public python-fpylll
195 (name "python-fpylll")
199 ;; Pypi contains and older release, so we use a tagged release from
203 (url "https://github.com/fplll/fpylll.git")
204 (commit (string-append version "dev"))))
205 (file-name (git-file-name name version))
208 "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
209 (build-system python-build-system)
214 ("pari-gp" ,pari-gp)))
216 `(("cysignals" ,python-cysignals)
217 ("cython" ,python-cython)
218 ("flake8" ,python-flake8)
219 ("numpy" ,python-numpy)
220 ("pytest" ,python-pytest)))
221 (home-page "https://github.com/fplll/fpylll")
222 (synopsis "Python interface for fplll")
223 (description "fpylll is a Python wrapper for fplll.")
224 (license license:gpl2+)))
226 (define-public pari-gp
233 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
237 "0fck8ssmirl8fy7s4mspgrxjs5sag76xbshqlqzkcl3kqyrk4raa"))))
238 (build-system gnu-build-system)
240 `(("texlive" ,(texlive-union
241 (list texlive-amsfonts)))))
242 (inputs `(("gmp" ,gmp)
245 ("readline" ,readline)))
247 '(#:make-flags '("all")
248 #:test-target "dobench"
250 (modify-phases %standard-phases
252 (lambda* (#:key outputs #:allow-other-keys)
253 (invoke "./Configure"
254 (string-append "--prefix="
255 (assoc-ref outputs "out"))))))))
256 (synopsis "PARI/GP, a computer algebra system for number theory")
258 "PARI/GP is a widely used computer algebra system designed for fast
259 computations in number theory (factorisations, algebraic number theory,
260 elliptic curves...), but it also contains a large number of other useful
261 functions to compute with mathematical entities such as matrices,
262 polynomials, power series, algebraic numbers, etc., and a lot of
263 transcendental functions.
264 PARI is also available as a C library to allow for faster computations.")
265 (license license:gpl2+)
266 (home-page "https://pari.math.u-bordeaux.fr/")))
271 (version "0.0.11pl2")
275 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
279 "0wqsf05wgkqvmmsx7jinvzdqav6rl56sr8haibgs31nzz4x9xz9g"))))
280 (build-system gnu-build-system)
281 (native-inputs `(("perl" ,perl)))
282 (inputs `(("pari-gp" ,pari-gp)))
285 (list (string-append "--with-paricfg="
286 (assoc-ref %build-inputs "pari-gp")
287 "/lib/pari/pari.cfg"))))
288 (synopsis "PARI/GP, a computer algebra system for number theory")
290 "PARI/GP is a widely used computer algebra system designed for fast
291 computations in number theory (factorisations, algebraic number theory,
292 elliptic curves...), but it also contains a large number of other useful
293 functions to compute with mathematical entities such as matrices,
294 polynomials, power series, algebraic numbers, etc., and a lot of
295 transcendental functions.
296 PARI is also available as a C library to allow for faster computations.
298 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
299 (license license:gpl2)
300 (home-page "https://pari.math.u-bordeaux.fr/")))
311 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
314 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
323 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
327 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
328 (build-system gnu-build-system)
334 ("fplll" ,fplll-4-cmh)
335 ("pari-gp" ,pari-gp)))
336 (synopsis "Igusa class polynomial computations")
338 "The CMH software computes Igusa (genus 2) class polynomials, which
339 parameterize the CM points in the moduli space of 2-dimensional abelian
340 varieties, i.e. Jacobians of hyperelliptic curves.
341 It can also be used to compute theta constants at arbitrary
343 (license license:gpl3+)
344 (home-page "http://cmh.gforge.inria.fr/")))
352 ;; "~parisse/giac" is not used because the maintainer regularly
353 ;; overwrites the release tarball there, introducing a checksum
354 ;; mismatch every time. See
355 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
356 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
357 "~parisse/debian/dists/stable/main/"
358 "source/giac_" version ".tar.gz"))
361 "03icgrfhb1xiy95cqmfgmcb1lw3775mr2ybnzandmyn44iycs6rh"))))
362 (build-system gnu-build-system)
364 `(#:modules ((ice-9 ftw)
366 (guix build gnu-build-system))
368 (modify-phases %standard-phases
369 (add-after 'unpack 'patch-bin-cp
370 ;; Some Makefiles contain hard-coded "/bin/cp".
372 (substitute* (find-files "doc" "^Makefile")
373 (("/bin/cp") (which "cp")))
375 (add-after 'unpack 'disable-failing-test
376 ;; FIXME: Test failing. Not sure why.
378 (substitute* "check/Makefile.in"
381 (add-after 'install 'fix-doc
382 (lambda* (#:key outputs #:allow-other-keys)
383 (let ((out (assoc-ref outputs "out")))
384 ;; Most French documentation has a non-commercial
385 ;; license, so we need to remove it.
386 (with-directory-excursion (string-append out "/share/giac/doc/fr")
387 (for-each delete-file-recursively
388 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
390 ;; Remove duplicate documentation in
391 ;; "%out/share/doc/giac/", where Xcas does not expect
393 (delete-file-recursively (string-append out "/share/doc/giac"))
395 (add-after 'install 'remove-unnecessary-executable
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let ((out (assoc-ref outputs "out")))
398 (delete-file (string-append out "/bin/xcasnew"))
401 ;;; TODO: Add libnauty.
408 ("libjpeg" ,libjpeg-turbo)
410 ("libsamplerate" ,libsamplerate)
412 ("libxinerama" ,libxinerama)
425 ("readline" ,readline)
426 ("texlive" ,texlive-tiny)))
427 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
428 (synopsis "Computer algebra system")
430 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
431 maple, mupad and the TI89. It is available as a standalone program (graphic
432 or text interfaces) or as a C++ library.")
433 (license license:gpl3+)))
435 (define-public giac-xcas
436 (deprecated-package "giac-xcas" giac))
445 "http://flintlib.org/flint-"
448 "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
449 (patches (search-patches "flint-ldconfig.patch"))))
450 (build-system gnu-build-system)
453 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
455 `(#:parallel-tests? #f ; seems to be necessary on arm
457 (modify-phases %standard-phases
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (let ((out (assoc-ref outputs "out"))
461 (gmp (assoc-ref inputs "gmp"))
462 (mpfr (assoc-ref inputs "mpfr")))
463 ;; do not pass "--enable-fast-install", which makes the
464 ;; homebrew configure process fail
465 (invoke "./configure"
466 (string-append "--prefix=" out)
467 (string-append "--with-gmp=" gmp)
468 (string-append "--with-mpfr=" mpfr))
470 (synopsis "Fast library for number theory")
472 "FLINT is a C library for number theory. It supports arithmetic
473 with numbers, polynomials, power series and matrices over many base
474 rings, including multiprecision integers and rationals, integers
475 modulo n, p-adic numbers, finite fields (prime and non-prime order)
476 and real and complex numbers (via the Arb extension library).
478 Operations that can be performed include conversions, arithmetic,
479 GCDs, factoring, solving linear systems, and evaluating special
480 functions. In addition, FLINT provides various low-level routines for
482 (license license:gpl2+)
483 (home-page "http://flintlib.org/")))
492 (url "https://github.com/fredrik-johansson/arb.git")
494 (file-name (git-file-name name version))
497 "05lpy3hkl5f8ik19aw40cqydrb932xaf2n8hbq9ib5dnk7f010p1"))))
498 (build-system gnu-build-system)
500 `(("flint" ,flint))) ; flint.h is included by arf.h
506 (modify-phases %standard-phases
508 (lambda* (#:key inputs outputs #:allow-other-keys)
509 (let ((out (assoc-ref outputs "out"))
510 (flint (assoc-ref inputs "flint"))
511 (gmp (assoc-ref inputs "gmp"))
512 (mpfr (assoc-ref inputs "mpfr")))
513 ;; Do not pass "--enable-fast-install", which makes the
514 ;; homebrew configure process fail.
515 (invoke "./configure"
516 (string-append "--prefix=" out)
517 (string-append "--with-flint=" flint)
518 (string-append "--with-gmp=" gmp)
519 (string-append "--with-mpfr=" mpfr))))))))
520 (synopsis "Arbitrary precision floating-point ball arithmetic")
522 "Arb is a C library for arbitrary-precision floating-point ball
523 arithmetic. It supports efficient high-precision computation with
524 polynomials, power series, matrices and special functions over the
525 real and complex numbers, with automatic, rigorous error control.")
526 (license license:lgpl2.1+)
527 (home-page "http://arblib.org")))
529 (define-public python-flint
531 (name "python-flint")
536 (url "https://github.com/fredrik-johansson/python-flint.git")
538 (file-name (git-file-name name version))
541 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
542 (patches (search-patches "python-flint-includes.patch"))))
543 (build-system python-build-system)
545 `(("python-cython" ,python-cython)))
547 `(("python-numpy" ,python-numpy)))
551 (synopsis "Python module wrapping ARB and FLINT")
553 "Python-flint is a Python extension module wrapping FLINT
554 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
555 arithmetic). It supports integers, rationals, modular integers,
556 real and complex ball arithmetic, polynomials and matrices over all
557 these types and other mathematical functions.")
558 (license license:expat)
559 (home-page "http://fredrikj.net/python-flint/")))
567 (uri (string-append "http://shoup.net/ntl/ntl-"
570 "115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
571 (build-system gnu-build-system)
573 `(("libtool" ,libtool)
574 ("perl" ,perl))) ; for configuration
575 ;; FIXME: Add optional input gf2x once available; then also add
576 ;; configure flag "NTL_GF2X_LIB=on".
581 (modify-phases %standard-phases
583 (lambda* (#:key outputs #:allow-other-keys)
585 (system* "./configure"
586 (string-append "PREFIX=" (assoc-ref outputs "out"))
587 ;; Do not build especially for the build machine.
589 ;; Also do not tune to the build machine.
593 (synopsis "C++ library for number theory")
595 "NTL is a C++ library providing data structures and algorithms
596 for manipulating signed, arbitrary length integers, and for vectors,
597 matrices, and polynomials over the integers and over finite fields.")
598 (license license:gpl2+)
599 (home-page "http://shoup.net/ntl/")))
601 (define-public singular
609 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
613 (string-trim-right version #\p
614 0 (1- (string-length version)))
616 "/singular-" version ".tar.gz"))
618 "0kvd55353fiqyq1msmi0kka66n5h0aqs7m3km60r01b1w2f8085m"))))
619 (build-system gnu-build-system)
621 `(("doxygen" ,doxygen)
622 ("graphviz" ,graphviz)
631 ("readline" ,readline)))
634 (list (string-append "--with-ntl="
635 (assoc-ref %build-inputs "ntl")))))
636 (synopsis "Computer algebra system for polynomial computations")
638 "Singular is a computer algebra system for polynomial computations,
639 with special emphasis on commutative and non-commutative algebra, algebraic
640 geometry and singularity theory.")
641 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
642 ;; libraries with which it links are licensed under lgpl3+, so the
643 ;; combined work becomes gpl3. See COPYING in the source code.
644 (license license:gpl3)
645 (home-page "http://www.singular.uni-kl.de/index.php")))
647 (define-public gmp-ecm
653 ;; Use the ‘Latest version’ link for a stable URI across releases.
654 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
655 "latestfile/160/ecm-" version ".tar.gz"))
657 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
658 (build-system gnu-build-system)
662 `(#:configure-flags '("--enable-shared"
663 ;; Disable specific assembly routines, which depend
664 ;; on the subarchitecture of the build machine,
665 ;; and use gmp instead.
666 "--disable-asm-redc")))
667 (synopsis "Integer factorization library using the elliptic curve method")
669 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
670 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
672 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
673 ;; so the combined work is under gpl3+.
674 (license license:gpl3+)
675 (home-page "http://ecm.gforge.inria.fr/")))
683 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
686 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
687 (patches (search-patches "bc-fix-cross-compilation.patch"))))
688 (build-system gnu-build-system)
690 `(("automake" ,automake)
691 ("autoconf" ,autoconf)
694 ("texinfo" ,texinfo)))
697 (list "--with-readline")
699 (modify-phases %standard-phases
700 (add-after 'unpack 'autogen
702 (invoke "autoreconf" "-vif"))))))
703 (home-page "https://www.gnu.org/software/bc/")
704 (synopsis "Arbitrary precision numeric processing language")
706 "bc is an arbitrary precision numeric processing language. It includes
707 an interactive environment for evaluating mathematical statements. Its
708 syntax is similar to that of C, so basic usage is familiar. It also includes
709 \"dc\", a reverse-polish calculator.")
710 (license license:gpl2+)))
712 ;; The original kiss-fft does not have a complete build system and does not
713 ;; build any shared libraries. This is a fork used by Extempore.
714 (define-public kiss-fft-for-extempore
716 (name "kiss-fft-for-extempore")
721 (url "https://github.com/extemporelang/kiss_fft.git")
723 (file-name (git-file-name name version))
726 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
727 (build-system cmake-build-system)
728 (arguments `(#:tests? #f)) ; no tests included
729 ;; Extempore refuses to build on architectures other than x86_64
730 (supported-systems '("x86_64-linux"))
731 (home-page "https://github.com/extemporelang/kiss_fft")
732 (synopsis "Mixed-radix Fast Fourier Transform")
734 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
735 that can use fixed or floating data types and can easily be incorporated into
737 (license license:bsd-3)))
745 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
749 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
750 (build-system gnu-build-system)
753 '("--enable-shared" "--enable-openmp" "--enable-threads"
754 ,@(let ((system (or (%current-target-system) (%current-system))))
755 ;; Enable SIMD extensions for codelets. See details at:
756 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
758 ((string-prefix? "x86_64" system)
759 '("--enable-sse2" "--enable-avx" "--enable-avx2"
760 "--enable-avx512" "--enable-avx-128-fma"))
761 ((string-prefix? "i686" system)
763 ((string-prefix? "aarch64" system)
764 ;; Note that fftw supports NEON on 32-bit ARM only when
765 ;; compiled for single-precision.
769 ;; By default '-mtune=native' is used. However, that may cause the
770 ;; use of ISA extensions (e.g. AVX) that are not necessarily
771 ;; available on the user's machine when that package is built on a
772 ;; different machine.
773 "ax_cv_c_flags__mtune_native=no")))
774 (native-inputs `(("perl" ,perl)))
775 (home-page "http://fftw.org")
776 (synopsis "Computing the discrete Fourier transform")
778 "FFTW is a C subroutine library for computing the discrete Fourier
779 transform (DFT) in one or more dimensions, of arbitrary input size, and of
780 both real and complex data (as well as of even/odd data---i.e. the discrete
781 cosine/ sine transforms or DCT/DST).")
782 (license license:gpl2+)))
785 (package (inherit fftw)
788 (substitute-keyword-arguments (package-arguments fftw)
789 ((#:configure-flags fftw-configure-flags)
790 `(cons* "--enable-single"
791 ,@(if (string-prefix? "arm" (or (%current-target-system)
793 ;; fftw supports NEON on 32-bit ARM only when compiled
794 ;; for single-precision, so add it here.
797 ,fftw-configure-flags))))
799 (string-append (package-description fftw)
800 " Single-precision version."))))
802 (define-public fftw-openmpi
803 (package (inherit fftw)
804 (name "fftw-openmpi")
806 `(("openmpi" ,openmpi)
807 ,@(package-inputs fftw)))
809 (substitute-keyword-arguments (package-arguments fftw)
810 ((#:configure-flags cf)
811 `(cons "--enable-mpi" ,cf))
812 ((#:phases phases '%standard-phases)
813 `(modify-phases ,phases
814 (add-before 'check 'mpi-setup
817 (string-append (package-description fftw)
818 " With OpenMPI parallelism support."))))
820 (define-public java-la4j
827 (url "https://github.com/vkostyukov/la4j.git")
829 (file-name (string-append name "-" version "-checkout"))
832 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
833 (build-system ant-build-system)
835 `(#:jar-name "la4j.jar"
837 #:test-exclude (list "**/Abstract*.java"
839 "**/DenseMatrixTest.java"
840 "**/SparseMatrixTest.java"
842 "**/SparseVectorTest.java"
843 "**/DenseVectorTest.java")))
845 `(("java-junit" ,java-junit)
846 ("java-hamcrest-core" ,java-hamcrest-core)))
847 (home-page "http://la4j.org/")
848 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
849 (description "The la4j library is a Java library that provides Linear
850 Algebra primitives (matrices and vectors) and algorithms. The key features of
851 the la4j library are:
854 @item No dependencies and tiny size
855 @item Fluent object-oriented/functional API
856 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
857 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
858 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
859 @item MatrixMarket/CSV IO formats support for matrices and vectors
861 (license license:asl2.0)))
863 (define-public java-jlargearrays
865 (name "java-jlargearrays")
869 (uri (string-append "http://search.maven.org/remotecontent?"
870 "filepath=pl/edu/icm/JLargeArrays/"
871 version "/JLargeArrays-" version
873 (file-name (string-append name "-" version ".jar"))
876 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
877 (build-system ant-build-system)
879 `(#:jar-name "jlargearrays.jar"
880 #:tests? #f ; tests are not included in the release archive
883 `(("java-commons-math3" ,java-commons-math3)))
884 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
885 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
886 (description "JLargeArrays is a Java library of one-dimensional arrays
887 that can store up to 263 elements.")
888 (license license:bsd-2)))
890 (define-public java-jtransforms
892 (name "java-jtransforms")
896 (uri (string-append "http://search.maven.org/remotecontent?"
897 "filepath=com/github/wendykierp/JTransforms/"
898 version "/JTransforms-" version "-sources.jar"))
901 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
902 (build-system ant-build-system)
904 `(#:jar-name "jtransforms.jar"
905 #:tests? #f ; tests are not included in the release archive
908 `(("java-commons-math3" ,java-commons-math3)
909 ("java-jlargearrays" ,java-jlargearrays)))
910 (home-page "https://github.com/wendykierp/JTransforms")
911 (synopsis "Multithreaded FFT library written in pure Java")
912 (description "JTransforms is a multithreaded FFT library written in pure
913 Java. Currently, four types of transforms are available: @dfn{Discrete
914 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
915 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
916 (license license:bsd-2)))
924 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
928 "1qh3yrwn78ms5yhwbpl5wvblk4gbz02cacdygxylr7i9xbrvylkk"))
929 (file-name (string-append name "-" version ".tar.bz2"))
930 (modules '((guix build utils)))
932 ;; There are 3 test failures in the "unsupported" directory,
933 ;; but maintainers say it's a known issue and it's unsupported
934 ;; anyway, so just skip them.
936 (substitute* "unsupported/CMakeLists.txt"
937 (("add_subdirectory\\(test.*")
938 "# Do not build the tests for unsupported features.\n"))
940 (build-system cmake-build-system)
942 '(;; Turn off debugging symbols to save space.
943 #:build-type "Release"
945 #:phases (modify-phases %standard-phases
948 (let* ((cores (parallel-job-count))
949 (dash-j (format #f "-j~a" cores)))
950 (setenv "EIGEN_SEED" "1") ;for reproducibility
951 ;; First build the tests, in parallel. See
952 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
953 (invoke "make" "buildtests" dash-j)
955 ;; Then run 'CTest' with -V so we get more
956 ;; details upon failure.
957 (invoke "ctest" "-V" dash-j)))))))
958 (home-page "https://eigen.tuxfamily.org")
959 (synopsis "C++ template library for linear algebra")
961 "Eigen is a C++ template library for linear algebra: matrices, vectors,
962 numerical solvers, and related algorithms. It provides an elegant API based
963 on \"expression templates\". It is versatile: it supports all matrix sizes,
964 all standard numeric types, various matrix decompositions and geometry
965 features, and more.")
967 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
968 ;; See 'COPYING.README' for details.
969 (license license:mpl2.0)))
971 (define-public eigen-for-tensorflow
972 (let ((changeset "fd6845384b86")
974 (package (inherit eigen)
975 (name "eigen-for-tensorflow")
976 (version (string-append "3.3.5-" revision "." changeset))
980 (url "https://bitbucket.org/eigen/eigen")
981 (changeset changeset)))
984 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
985 (file-name (string-append name "-" version "-checkout"))
986 (modules '((guix build utils)))
988 ;; There are 3 test failures in the "unsupported" directory,
989 ;; but maintainers say it's a known issue and it's unsupported
990 ;; anyway, so just skip them.
992 (substitute* "unsupported/CMakeLists.txt"
993 (("add_subdirectory\\(test.*")
994 "# Do not build the tests for unsupported features.\n"))
997 (define-public xtensor
1004 (url "https://github.com/QuantStack/xtensor.git")
1008 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1009 (file-name (git-file-name name version))))
1010 (build-system cmake-build-system)
1012 `(("googletest" ,googletest)
1016 '("-DBUILD_TESTS=ON")
1017 #:test-target "xtest"))
1018 (home-page "https://quantstack.net/xtensor")
1019 (synopsis "C++ tensors with broadcasting and lazy computing")
1020 (description "xtensor is a C++ library meant for numerical analysis with
1021 multi-dimensional array expressions.
1025 @item an extensible expression system enabling lazy broadcasting.
1026 @item an API following the idioms of the C++ standard library.
1027 @item tools to manipulate array expressions and build upon xtensor.
1029 (license license:bsd-3)))
1038 (uri (string-append "https://www.gap-system.org/pub/gap/gap-"
1039 (version-major+minor version)
1044 (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
1045 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1048 ;; Delete the external gmp and zlib libraries
1049 ;; and a subdirectory not needed for our build.
1050 (for-each delete-file-recursively
1051 '("extern" "hpcgap"))
1052 ;; Delete a failing test.
1053 ;; FIXME: This might be fixed in the next release, see
1054 ;; https://github.com/gap-system/gap/issues/3292
1055 (delete-file "tst/testinstall/dir.tst")
1056 ;; Delete all packages except for a fixed list.
1057 (with-directory-excursion "pkg"
1058 (for-each delete-file-recursively
1059 (lset-difference string=? (scandir ".")
1061 ;; Necessary packages.
1064 "SmallGrp-1.3" ; artistic2.0
1065 "transgrp" ; artistic2.0 for data,
1066 ; gpl2 or gpl3 for code
1067 ;; Recommanded package.
1069 ;; Optional packages, searched for at start,
1070 ;; and their depedencies.
1073 "crisp-1.4.4" ; bsd-2
1074 "ctbllib" ; gpl3+ according to doc/chap0.txt
1077 "irredsol-1.4" ; bsd-2
1084 "tomlib-1.2.7" ; gpl2+, clarified in the git repository
1085 ; and the next release
1088 (build-system gnu-build-system)
1093 `(#:modules ((ice-9 ftw)
1095 (guix build gnu-build-system)
1098 (modify-phases %standard-phases
1099 (add-after 'build 'build-packages
1100 ;; Compile all packages that have not been deleted by the
1101 ;; code snippet above.
1103 (setenv "CONFIG_SHELL" (which "bash"))
1104 (with-directory-excursion "pkg"
1105 (invoke "../bin/BuildPackages.sh")
1107 (add-after 'build-packages 'build-doc
1108 ;; The documentation is bundled, but we create it from source.
1110 (with-directory-excursion "doc"
1111 (invoke "./make_doc"))
1114 (lambda* (#:key outputs #:allow-other-keys)
1115 (let* ((out (assoc-ref outputs "out"))
1116 (bin (string-append out "/bin"))
1117 (lib (string-append out "/lib"))
1118 (prog (string-append bin "/gap"))
1119 (prog-real (string-append bin "/.gap-real"))
1120 (share (string-append out "/share/gap"))
1121 (include (string-append out "/include/gap"))
1122 (include-hpc (string-append include "/hpc")))
1123 ;; Install only the gap binary; the gac compiler is left
1124 ;; for maybe later. "Wrap" it in a shell script that calls
1125 ;; the binary with the correct parameter.
1127 (copy-file "gap" prog-real)
1128 (call-with-output-file prog
1131 "#!~a~%exec ~a -l ~a \"$@\"~%"
1136 ;; Install the headers, which are needed by Sage. The
1137 ;; Makefile target "install-headers" was available in
1138 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1139 (mkdir-p include-hpc)
1140 (install-file "gen/config.h" include)
1141 (let ((file-name-predicate-without-stat
1143 (cut (file-name-predicate regex) <> #f))))
1144 (with-directory-excursion "src"
1146 (cut install-file <> include)
1148 (file-name-predicate-without-stat ".*\\.h$"))))
1149 (with-directory-excursion "src/hpc"
1151 (cut install-file <> include-hpc)
1153 (file-name-predicate-without-stat ".*\\.h$")))))
1154 ;; Install the library, which is needed by Sage. The
1155 ;; Makefile target "install-libgap" was available in
1156 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1157 ;; Compared to the Makefile, which used libtool, the
1158 ;; following approach of copying files and making symlinks
1159 ;; is rather pedestrian. There is hope that some later
1160 ;; version of gap reinstates and completes the install
1162 (invoke "make" "libgap.la")
1163 (install-file "libgap.la" lib)
1164 (install-file ".libs/libgap.so.0.0.0" lib)
1165 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so"))
1166 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so.0"))
1167 ;; Install a certain number of files and directories to
1168 ;; SHARE, where the wrapped shell script expects them.
1169 ;; Remove information on the build directory from sysinfo.gap.
1170 (substitute* "sysinfo.gap"
1171 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1172 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1173 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1174 (install-file "sysinfo.gap" share)
1175 (copy-recursively "grp" (string-append share "/grp"))
1176 (copy-recursively "pkg" (string-append share "/pkg"))
1177 ;; The following is not the C library libgap.so, but a
1178 ;; library of GAP code.
1179 (copy-recursively "lib" (string-append share "/lib"))
1180 ;; The gap binary looks for documentation inside SHARE.
1181 (copy-recursively "doc" (string-append share "/doc")))
1183 (home-page "https://www.gap-system.org/")
1185 "System for computational group theory")
1187 "GAP is a system for computational discrete algebra, with particular
1188 emphasis on computational group theory. It provides a programming language,
1189 a library of thousands of functions implementing algebraic algorithms
1190 written in the GAP language as well as large data libraries of algebraic
1192 ;; Some packages have different licenses (effectively forcing the
1193 ;; combined work to be licensed as gpl3+); if this is the case, this
1194 ;; is mentioned above next to their name.
1195 ;; Some packages have no license mentioned explicitly; supposedly this
1196 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1197 ;; safe side, we drop them for now.
1198 (license license:gpl2+)))
1200 (define-public givaro
1207 (url "https://github.com/linbox-team/givaro")
1208 (commit (string-append "v" version))))
1209 (file-name (git-file-name name version))
1212 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1213 (build-system gnu-build-system)
1215 `(("autoconf" ,autoconf)
1216 ("automake" ,automake)
1217 ("libtool" ,libtool)))
1219 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1220 (synopsis "Algebraic computations with exact rings and fields")
1222 "Givaro is a C++ library implementing the basic arithmetic of various
1223 algebraic objects: prime fields, extension fields, finite fields, finite
1224 rings, polynomials, algebraic numbers, arbitrary precision integers and
1225 rationals (C++ wrappers over gmp), fixed precision integers. It also
1226 provides data-structures and templated classes for the manipulation of
1227 compound objects, such as vectors, matrices and univariate polynomials.")
1228 (license license:cecill-b)
1229 (home-page "https://github.com/linbox-team/givaro")))
1231 (define-public fflas-ffpack
1233 (name "fflas-ffpack")
1238 (url "https://github.com/linbox-team/fflas-ffpack")
1240 (file-name (git-file-name name version))
1243 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1244 (build-system gnu-build-system)
1246 `(("autoconf" ,autoconf)
1247 ("automake" ,automake)
1248 ("libtool" ,libtool)
1249 ("pkg-config" ,pkg-config)))
1251 `(("openblas" ,openblas)))
1253 `(("givaro" ,givaro))) ; required according to the .pc file
1256 (list (string-append "--with-blas-libs="
1257 (assoc-ref %build-inputs "openblas")
1258 "/lib/libopenblas.so"))))
1259 (synopsis "C++ library for linear algebra over finite fields")
1261 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1262 operations over a finite field.
1263 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1264 of a subset of routines of the numerical BLAS; it also supports sparse
1265 matrix-vector products.
1266 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1267 library to provide functionalities of higher level, using the kernel
1268 of a BLAS. Additionally, it provides routines specific to exact linear
1269 algebra, such as the row echelon form.")
1270 (license license:lgpl2.1+)
1271 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1273 (define-public linbox
1280 (url "https://github.com/linbox-team/linbox")
1281 (commit (string-append "v" version))))
1282 (file-name (git-file-name name version))
1285 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))))
1286 (build-system gnu-build-system)
1288 `(("autoconf" ,autoconf)
1289 ("automake" ,automake)
1290 ("libtool" ,libtool)
1291 ("pkg-config" ,pkg-config)))
1293 `(("fflas-ffpack" ,fflas-ffpack)))
1294 (synopsis "C++ library for linear algebra over exact rings")
1296 "LinBox is a C++ template library for exact linear algebra computation
1297 with dense, sparse, and structured matrices over the integers and over
1299 (license license:lgpl2.1+)
1300 (home-page "https://linbox-team.github.io/linbox/")))
1305 (version "20140914")
1309 (url "https://bitbucket.org/malb/m4ri")
1310 (commit (string-append "release-" version))))
1311 (file-name (git-file-name name version))
1314 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1315 (build-system gnu-build-system)
1317 `(("autoconf" ,autoconf)
1318 ("automake" ,automake)
1319 ("libtool" ,libtool)
1320 ("pkg-config" ,pkg-config)))
1322 `(("libpng" ,libpng)))
1323 (synopsis "Arithmetic of dense matrices over F_2")
1324 (description "M4RI is a library for fast arithmetic with dense matrices
1325 over F2. The name M4RI comes from the first implemented algorithm: The
1326 Method of the Four Russians inversion algorithm published by Gregory Bard.
1327 This algorithm in turn is named after the Method of the Four Russians
1328 multiplication algorithm.")
1329 (license license:gpl2+)
1330 (home-page "https://bitbucket.org/malb/m4ri/")))
1332 (define-public symmetrica
1337 (method url-fetch/tarbomb)
1338 (uri (let ((v (string-join (string-split version #\.) "_")))
1339 (string-append "http://www.algorithm.uni-bayreuth.de/"
1340 "en/research/SYMMETRICA/"
1341 "SYM" v "_tar.gz")))
1344 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1345 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1346 (patches (search-patches "symmetrica-bruch.patch"
1347 "symmetrica-int32.patch"
1348 "symmetrica-return_values.patch"
1349 "symmetrica-sort_sum_rename.patch"))))
1350 (build-system gnu-build-system)
1352 `(#:tests? #f ;no test
1354 (modify-phases %standard-phases
1355 (add-after 'unpack 'fix-makefile
1357 (substitute* "makefile"
1358 (("cc -c") "gcc -c -fPIC"))
1360 (add-after 'fix-makefile 'turn-off-banner
1363 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1365 (delete 'configure) ;no configure script
1366 (replace 'install ;no install target
1367 (lambda* (#:key outputs #:allow-other-keys)
1368 (let* ((out (assoc-ref outputs "out"))
1369 (lib (string-append out "/lib"))
1370 (inc (string-append out "/include/symmetrica"))
1371 (doc (string-append out "/share/doc/symmetrica-" ,version))
1372 (static "libsymmetrica.a"))
1373 ;; Build static library.
1374 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1375 (invoke "ranlib" static)
1376 ;; Install static library and headers.
1377 (for-each (lambda (f) (install-file f inc))
1378 (find-files "." "\\.h$"))
1379 (install-file "libsymmetrica.a" lib)
1380 ;; Install documentation.
1381 (for-each (lambda (f) (install-file f doc))
1382 (find-files "." "\\.doc$"))
1384 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1385 (synopsis "Combinatoric C Library")
1386 (description "Symmetrica is a library for combinatorics. It has support
1387 for the representation theory of the symmetric group and related groups,
1388 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1389 polynomials, and the representation theory of Hecke algebras of type A_n.")
1390 (license license:public-domain)))
1392 (define-public m4rie
1395 (version "20150908")
1399 (url "https://bitbucket.org/malb/m4rie")
1400 (commit (string-append "release-" version))))
1401 (file-name (git-file-name name version))
1404 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1405 (build-system gnu-build-system)
1407 `(("autoconf" ,autoconf)
1408 ("automake" ,automake)
1409 ("libtool" ,libtool)))
1412 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1413 (description "M4RI is a library for fast arithmetic with dense matrices
1414 over finite fields of characteristic 2. So it extends the functionality
1415 of M4RI from F_2 to F_{2^e}.")
1416 (license license:gpl2+)
1417 (home-page "https://bitbucket.org/malb/m4rie/")))
1419 (define-public eclib
1422 (version "20190909")
1426 (url "https://github.com/JohnCremona/eclib/")
1427 (commit (string-append "v" version))))
1428 (file-name (git-file-name name version))
1431 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1432 (build-system gnu-build-system)
1434 `(("autoconf" ,autoconf)
1435 ("automake" ,automake)
1436 ("libtool" ,libtool)))
1440 ("pari-gp" ,pari-gp)))
1441 (synopsis "Ranks of elliptic curves and modular symbols")
1442 (description "The eclib package includes mwrank (for 2-descent on
1443 elliptic curves over Q) and modular symbol code; it has been written by
1444 John Cremona to compute his elliptic curve database.")
1445 (license license:gpl2+)
1446 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1447 "J.E.Cremona/mwrank/index.html"))))
1449 (define-public lrcalc
1456 (url "https://bitbucket.org/asbuch/lrcalc")
1457 (commit (string-append "lrcalc-" version))))
1458 (file-name (git-file-name name version))
1461 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1462 (patches (search-patches "lrcalc-includes.patch"))))
1463 (build-system gnu-build-system)
1465 `(("autoconf" ,autoconf)
1466 ("automake" ,automake)
1467 ("libtool" ,libtool)))
1470 (modify-phases %standard-phases
1471 (add-before 'build 'fix-permission
1473 (chmod "lrcalc.maple.src" #o644)
1475 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1476 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1477 program designed to compute Littlewood-Richardson coefficients. It computes
1478 single Littlewood-Richardson coefficients, products of Schur functions, or
1479 skew Schur functions. In addition it computes products in the small quantum
1480 cohomology ring of a Grassmann variety. The software package also includes
1481 a program that performs fast computation of the more general multiplicative
1482 structure constants of Schubert polynomials.")
1483 (license license:gpl2+)
1484 (home-page "http://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1493 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1494 version ".tar.bz2"))
1497 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1498 (build-system gnu-build-system)
1501 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1502 ; mentions ATLAS in particular
1507 (string-append "--with-gmp-include="
1508 (assoc-ref %build-inputs "gmp") "/include")
1509 (string-append "--with-gmp-lib="
1510 (assoc-ref %build-inputs "gmp") "/lib")
1511 "--with-cblas=-lopenblas"
1512 (string-append "--with-cblas-include="
1513 (assoc-ref %build-inputs "cblas") "/include")
1514 (string-append "--with-cblas-lib="
1515 (assoc-ref %build-inputs "cblas") "/lib"))))
1516 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1518 "Solver for systems of linear equations over the integers")
1520 "IML is a C library implementing algorithms for computing exact
1521 solutions to dense systems of linear equations over the integers.
1522 Currently, IML provides the following functionality:
1525 @item Nonsingular rational system solving:
1526 compute the unique rational solution X to the system AX=B, where A and B
1527 are integer matrices, A nonsingular.
1528 @item Compute the right nullspace or kernel of an integer matrix.
1529 @item Certified linear system solving:
1530 compute a minimal denominator solution x to a system Ax=b, where b is an
1531 integer vector and A is an integer matrix with arbitrary shape and
1535 In addition, IML provides some low level routines for a variety of mod p
1536 matrix operations: computing the row-echelon form, determinant, rank
1537 profile, and inverse of a mod p matrix. These mod p routines are not
1538 general purpose; they require that p satisfy some preconditions based on
1539 the dimension of the input matrix (usually p should be prime and should be
1540 no more than about 20 bits long).")
1541 (license license:bsd-3)))