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, 2020 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>
12 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages algebra)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages bison)
33 #:use-module (gnu packages check)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages cpp)
36 #:use-module (gnu packages documentation)
37 #:use-module (gnu packages ed)
38 #:use-module (gnu packages flex)
39 #:use-module (gnu packages fltk)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages graphviz)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages java)
44 #:use-module (gnu packages maths)
45 #:use-module (gnu packages mpi)
46 #:use-module (gnu packages multiprecision)
47 #:use-module (gnu packages perl)
48 #:use-module (gnu packages pkg-config)
49 #:use-module (gnu packages pulseaudio)
50 #:use-module (gnu packages python)
51 #:use-module (gnu packages python-xyz)
52 #:use-module (gnu packages readline)
53 #:use-module (gnu packages shells)
54 #:use-module (gnu packages tex)
55 #:use-module (gnu packages texinfo)
56 #:use-module (gnu packages xiph)
57 #:use-module (gnu packages xorg)
58 #:use-module (guix build-system ant)
59 #:use-module (guix build-system gnu)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system python)
62 #:use-module (guix download)
63 #:use-module (guix git-download)
64 #:use-module (guix hg-download)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix packages)
67 #:use-module (guix utils))
77 "http://www.multiprecision.org/downloads/mpfrcx-"
81 "1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
82 (build-system gnu-build-system)
86 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
87 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
89 "Mpfrcx is a library for the arithmetic of univariate polynomials over
90 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
91 on the rounding. For the time being, only the few functions needed to
92 implement the floating point approach to complex multiplication are
93 implemented. On the other hand, these comprise asymptotically fast
94 multiplication routines such as Toom–Cook and the FFT.")
95 (license license:lgpl3+)
96 (home-page "http://www.multiprecision.org/mpfrcx/")))
105 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
109 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
110 (build-system gnu-build-system)
111 (synopsis "Arithmetic of polynomials over binary finite fields")
113 "The gf2x library provides arithmetic of polynomials over finite fields
114 of characteristic 2. It implements the multiplication, squaring and
115 greatest common divisor operations.")
116 (license license:gpl3+)
117 (home-page "https://gforge.inria.fr/projects/gf2x/")))
126 "http://www.multiprecision.org/cm/download/cm-"
130 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
131 (build-system gnu-build-system)
134 ("zlib" ,zlib))) ; Header files included from cm_common.h.
136 `(("pari-gp" ,pari-gp)))
137 (synopsis "CM constructions for elliptic curves")
139 "The CM software implements the construction of ring class fields of
140 imaginary quadratic number fields and of elliptic curves with complex
141 multiplication via floating point approximations. It consists of libraries
142 that can be called from within a C program and of executable command
144 (license license:gpl3+)
145 (home-page "http://www.multiprecision.org/cm/")))
154 (url "https://github.com/fplll/fplll.git")
156 (file-name (git-file-name name version))
159 "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg"))))
160 (build-system gnu-build-system)
162 `(("autoconf" ,autoconf)
163 ("automake" ,automake)
164 ("libtool" ,libtool)))
168 (home-page "https://github.com/fplll/fplll")
169 (synopsis "Library for LLL-reduction of euclidean lattices")
171 "fplll contains implementations of several lattice algorithms.
172 The implementation relies on floating-point orthogonalization, and LLL
173 is central to the code, hence the name.
175 It includes implementations of floating-point LLL reduction
176 algorithms, offering different speed/guarantees ratios. It contains
177 a @emph{wrapper} choosing the estimated best sequence of variants in
178 order to provide a guaranteed output as fast as possible. In the case
179 of the wrapper, the succession of variants is oblivious to the user.
181 It includes an implementation of the BKZ reduction algorithm,
182 including the BKZ-2.0 improvements (extreme enumeration
183 pruning, pre-processing of blocks, early termination). Additionally,
184 Slide reduction and self dual BKZ are supported.
186 It also includes a floating-point implementation of the
187 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
188 vector. For the same task, the GaussSieve algorithm is also available
189 in fplll. Finally, it contains a variant of the enumeration algorithm
190 that computes a lattice vector closest to a given vector belonging to
191 the real span of the lattice.")
192 (license license:lgpl2.1+)))
194 (define-public python-fpylll
196 (name "python-fpylll")
200 ;; Pypi contains and older release, so we use a tagged release from
204 (url "https://github.com/fplll/fpylll.git")
205 (commit (string-append version "dev"))))
206 (file-name (git-file-name name version))
209 "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
210 (build-system python-build-system)
215 ("pari-gp" ,pari-gp)))
217 `(("cysignals" ,python-cysignals)
218 ("cython" ,python-cython)
219 ("flake8" ,python-flake8)
220 ("numpy" ,python-numpy)
221 ("pytest" ,python-pytest)))
222 (home-page "https://github.com/fplll/fpylll")
223 (synopsis "Python interface for fplll")
224 (description "fpylll is a Python wrapper for fplll.")
225 (license license:gpl2+)))
227 (define-public pari-gp
234 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
238 "0fck8ssmirl8fy7s4mspgrxjs5sag76xbshqlqzkcl3kqyrk4raa"))))
239 (build-system gnu-build-system)
241 `(("texlive" ,(texlive-union
242 (list texlive-amsfonts)))))
243 (inputs `(("gmp" ,gmp)
246 ("readline" ,readline)))
248 '(#:make-flags '("all")
249 #:test-target "dobench"
251 (modify-phases %standard-phases
253 (lambda* (#:key outputs #:allow-other-keys)
254 (invoke "./Configure"
255 (string-append "--prefix="
256 (assoc-ref outputs "out"))))))))
257 (synopsis "PARI/GP, a computer algebra system for number theory")
259 "PARI/GP is a widely used computer algebra system designed for fast
260 computations in number theory (factorisations, algebraic number theory,
261 elliptic curves...), but it also contains a large number of other useful
262 functions to compute with mathematical entities such as matrices,
263 polynomials, power series, algebraic numbers, etc., and a lot of
264 transcendental functions.
265 PARI is also available as a C library to allow for faster computations.")
266 (license license:gpl2+)
267 (home-page "https://pari.math.u-bordeaux.fr/")))
272 (version "0.0.11pl2")
276 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
280 "0wqsf05wgkqvmmsx7jinvzdqav6rl56sr8haibgs31nzz4x9xz9g"))))
281 (build-system gnu-build-system)
282 (native-inputs `(("perl" ,perl)))
283 (inputs `(("pari-gp" ,pari-gp)))
286 (list (string-append "--with-paricfg="
287 (assoc-ref %build-inputs "pari-gp")
288 "/lib/pari/pari.cfg"))))
289 (synopsis "PARI/GP, a computer algebra system for number theory")
291 "PARI/GP is a widely used computer algebra system designed for fast
292 computations in number theory (factorisations, algebraic number theory,
293 elliptic curves...), but it also contains a large number of other useful
294 functions to compute with mathematical entities such as matrices,
295 polynomials, power series, algebraic numbers, etc., and a lot of
296 transcendental functions.
297 PARI is also available as a C library to allow for faster computations.
299 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
300 (license license:gpl2)
301 (home-page "https://pari.math.u-bordeaux.fr/")))
312 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
315 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
324 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
328 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
329 (build-system gnu-build-system)
335 ("fplll" ,fplll-4-cmh)
336 ("pari-gp" ,pari-gp)))
337 (synopsis "Igusa class polynomial computations")
339 "The CMH software computes Igusa (genus 2) class polynomials, which
340 parameterize the CM points in the moduli space of 2-dimensional abelian
341 varieties, i.e. Jacobians of hyperelliptic curves.
342 It can also be used to compute theta constants at arbitrary
344 (license license:gpl3+)
345 (home-page "http://cmh.gforge.inria.fr/")))
354 ;; "~parisse/giac" is not used because the maintainer regularly
355 ;; overwrites the release tarball there, introducing a checksum
356 ;; mismatch every time. See
357 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
358 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
359 "~parisse/debian/dists/stable/main/source/"
360 "giac_" version ".tar.gz"))
362 (base32 "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"))))
363 (build-system gnu-build-system)
365 `(#:modules ((ice-9 ftw)
367 (guix build gnu-build-system))
369 (modify-phases %standard-phases
370 (add-after 'unpack 'patch-bin-cp
371 ;; Some Makefiles contain hard-coded "/bin/cp".
373 (substitute* (find-files "doc" "^Makefile")
374 (("/bin/cp") (which "cp")))
376 (add-after 'unpack 'disable-failing-test
377 ;; FIXME: Test failing. Not sure why.
379 (substitute* "check/Makefile.in"
382 (add-after 'install 'fix-doc
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let ((out (assoc-ref outputs "out")))
385 ;; Most French documentation has a non-commercial
386 ;; license, so we need to remove it.
387 (with-directory-excursion (string-append out "/share/giac/doc/fr")
388 (for-each delete-file-recursively
389 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
391 ;; Remove duplicate documentation in
392 ;; "%out/share/doc/giac/", where Xcas does not expect
394 (delete-file-recursively (string-append out "/share/doc/giac"))
396 (add-after 'install 'remove-unnecessary-executable
397 (lambda* (#:key outputs #:allow-other-keys)
398 (let ((out (assoc-ref outputs "out")))
399 (delete-file (string-append out "/bin/xcasnew"))
402 ;;; TODO: Add libnauty.
409 ("libjpeg" ,libjpeg-turbo)
411 ("libsamplerate" ,libsamplerate)
413 ("libxinerama" ,libxinerama)
426 ("readline" ,readline)
427 ("texlive" ,texlive-tiny)))
428 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
429 (synopsis "Computer algebra system")
431 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
432 maple, mupad and the TI89. It is available as a standalone program (graphic
433 or text interfaces) or as a C++ library.")
434 (license license:gpl3+)))
436 (define-public giac-xcas
437 (deprecated-package "giac-xcas" giac))
446 "http://flintlib.org/flint-"
449 "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
450 (patches (search-patches "flint-ldconfig.patch"))))
451 (build-system gnu-build-system)
454 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
456 `(#:parallel-tests? #f ; seems to be necessary on arm
458 (modify-phases %standard-phases
460 (lambda* (#:key inputs outputs #:allow-other-keys)
461 (let ((out (assoc-ref outputs "out"))
462 (gmp (assoc-ref inputs "gmp"))
463 (mpfr (assoc-ref inputs "mpfr")))
464 ;; do not pass "--enable-fast-install", which makes the
465 ;; homebrew configure process fail
466 (invoke "./configure"
467 (string-append "--prefix=" out)
468 (string-append "--with-gmp=" gmp)
469 (string-append "--with-mpfr=" mpfr))
471 (synopsis "Fast library for number theory")
473 "FLINT is a C library for number theory. It supports arithmetic
474 with numbers, polynomials, power series and matrices over many base
475 rings, including multiprecision integers and rationals, integers
476 modulo n, p-adic numbers, finite fields (prime and non-prime order)
477 and real and complex numbers (via the Arb extension library).
479 Operations that can be performed include conversions, arithmetic,
480 GCDs, factoring, solving linear systems, and evaluating special
481 functions. In addition, FLINT provides various low-level routines for
483 (license license:gpl2+)
484 (home-page "http://flintlib.org/")))
493 (url "https://github.com/fredrik-johansson/arb.git")
495 (file-name (git-file-name name version))
498 "05lpy3hkl5f8ik19aw40cqydrb932xaf2n8hbq9ib5dnk7f010p1"))))
499 (build-system gnu-build-system)
501 `(("flint" ,flint))) ; flint.h is included by arf.h
507 (modify-phases %standard-phases
509 (lambda* (#:key inputs outputs #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out"))
511 (flint (assoc-ref inputs "flint"))
512 (gmp (assoc-ref inputs "gmp"))
513 (mpfr (assoc-ref inputs "mpfr")))
514 ;; Do not pass "--enable-fast-install", which makes the
515 ;; homebrew configure process fail.
516 (invoke "./configure"
517 (string-append "--prefix=" out)
518 (string-append "--with-flint=" flint)
519 (string-append "--with-gmp=" gmp)
520 (string-append "--with-mpfr=" mpfr))))))))
521 (synopsis "Arbitrary precision floating-point ball arithmetic")
523 "Arb is a C library for arbitrary-precision floating-point ball
524 arithmetic. It supports efficient high-precision computation with
525 polynomials, power series, matrices and special functions over the
526 real and complex numbers, with automatic, rigorous error control.")
527 (license license:lgpl2.1+)
528 (home-page "http://arblib.org")))
530 (define-public python-flint
532 (name "python-flint")
537 (url "https://github.com/fredrik-johansson/python-flint.git")
539 (file-name (git-file-name name version))
542 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
543 (patches (search-patches "python-flint-includes.patch"))))
544 (build-system python-build-system)
546 `(("python-cython" ,python-cython)))
548 `(("python-numpy" ,python-numpy)))
552 (synopsis "Python module wrapping ARB and FLINT")
554 "Python-flint is a Python extension module wrapping FLINT
555 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
556 arithmetic). It supports integers, rationals, modular integers,
557 real and complex ball arithmetic, polynomials and matrices over all
558 these types and other mathematical functions.")
559 (license license:expat)
560 (home-page "http://fredrikj.net/python-flint/")))
568 (uri (string-append "http://shoup.net/ntl/ntl-"
571 "115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
572 (build-system gnu-build-system)
574 `(("libtool" ,libtool)
575 ("perl" ,perl))) ; for configuration
576 ;; FIXME: Add optional input gf2x once available; then also add
577 ;; configure flag "NTL_GF2X_LIB=on".
582 (modify-phases %standard-phases
584 (lambda* (#:key outputs #:allow-other-keys)
586 (system* "./configure"
587 (string-append "PREFIX=" (assoc-ref outputs "out"))
588 ;; Do not build especially for the build machine.
590 ;; Also do not tune to the build machine.
594 (synopsis "C++ library for number theory")
596 "NTL is a C++ library providing data structures and algorithms
597 for manipulating signed, arbitrary length integers, and for vectors,
598 matrices, and polynomials over the integers and over finite fields.")
599 (license license:gpl2+)
600 (home-page "http://shoup.net/ntl/")))
602 (define-public singular
610 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
614 (string-trim-right version #\p
615 0 (1- (string-length version)))
617 "/singular-" version ".tar.gz"))
619 "0kvd55353fiqyq1msmi0kka66n5h0aqs7m3km60r01b1w2f8085m"))))
620 (build-system gnu-build-system)
622 `(("doxygen" ,doxygen)
623 ("graphviz" ,graphviz)
632 ("readline" ,readline)))
635 (list (string-append "--with-ntl="
636 (assoc-ref %build-inputs "ntl")))))
637 (synopsis "Computer algebra system for polynomial computations")
639 "Singular is a computer algebra system for polynomial computations,
640 with special emphasis on commutative and non-commutative algebra, algebraic
641 geometry and singularity theory.")
642 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
643 ;; libraries with which it links are licensed under lgpl3+, so the
644 ;; combined work becomes gpl3. See COPYING in the source code.
645 (license license:gpl3)
646 (home-page "http://www.singular.uni-kl.de/index.php")))
648 (define-public gmp-ecm
654 ;; Use the ‘Latest version’ link for a stable URI across releases.
655 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
656 "latestfile/160/ecm-" version ".tar.gz"))
658 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
659 (build-system gnu-build-system)
663 `(#:configure-flags '("--enable-shared"
664 ;; Disable specific assembly routines, which depend
665 ;; on the subarchitecture of the build machine,
666 ;; and use gmp instead.
667 "--disable-asm-redc")))
668 (synopsis "Integer factorization library using the elliptic curve method")
670 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
671 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
673 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
674 ;; so the combined work is under gpl3+.
675 (license license:gpl3+)
676 (home-page "http://ecm.gforge.inria.fr/")))
684 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
687 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
688 (patches (search-patches "bc-fix-cross-compilation.patch"))))
689 (build-system gnu-build-system)
691 `(("automake" ,automake)
692 ("autoconf" ,autoconf)
695 ("texinfo" ,texinfo)))
698 (list "--with-readline")
700 (modify-phases %standard-phases
701 (add-after 'unpack 'autogen
703 (invoke "autoreconf" "-vif"))))))
704 (home-page "https://www.gnu.org/software/bc/")
705 (synopsis "Arbitrary precision numeric processing language")
707 "bc is an arbitrary precision numeric processing language. It includes
708 an interactive environment for evaluating mathematical statements. Its
709 syntax is similar to that of C, so basic usage is familiar. It also includes
710 \"dc\", a reverse-polish calculator.")
711 (license license:gpl2+)))
713 ;; The original kiss-fft does not have a complete build system and does not
714 ;; build any shared libraries. This is a fork used by Extempore.
715 (define-public kiss-fft-for-extempore
717 (name "kiss-fft-for-extempore")
722 (url "https://github.com/extemporelang/kiss_fft.git")
724 (file-name (git-file-name name version))
727 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
728 (build-system cmake-build-system)
729 (arguments `(#:tests? #f)) ; no tests included
730 ;; Extempore refuses to build on architectures other than x86_64
731 (supported-systems '("x86_64-linux"))
732 (home-page "https://github.com/extemporelang/kiss_fft")
733 (synopsis "Mixed-radix Fast Fourier Transform")
735 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
736 that can use fixed or floating data types and can easily be incorporated into
738 (license license:bsd-3)))
746 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
750 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
751 (build-system gnu-build-system)
754 '("--enable-shared" "--enable-openmp" "--enable-threads"
755 ,@(let ((system (or (%current-target-system) (%current-system))))
756 ;; Enable SIMD extensions for codelets. See details at:
757 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
759 ((string-prefix? "x86_64" system)
760 '("--enable-sse2" "--enable-avx" "--enable-avx2"
761 "--enable-avx512" "--enable-avx-128-fma"))
762 ((string-prefix? "i686" system)
764 ((string-prefix? "aarch64" system)
765 ;; Note that fftw supports NEON on 32-bit ARM only when
766 ;; compiled for single-precision.
770 ;; By default '-mtune=native' is used. However, that may cause the
771 ;; use of ISA extensions (e.g. AVX) that are not necessarily
772 ;; available on the user's machine when that package is built on a
773 ;; different machine.
774 "ax_cv_c_flags__mtune_native=no")))
775 (native-inputs `(("perl" ,perl)))
776 (home-page "http://fftw.org")
777 (synopsis "Computing the discrete Fourier transform")
779 "FFTW is a C subroutine library for computing the discrete Fourier
780 transform (DFT) in one or more dimensions, of arbitrary input size, and of
781 both real and complex data (as well as of even/odd data---i.e. the discrete
782 cosine/ sine transforms or DCT/DST).")
783 (license license:gpl2+)))
786 (package (inherit fftw)
789 (substitute-keyword-arguments (package-arguments fftw)
790 ((#:configure-flags fftw-configure-flags)
791 `(cons* "--enable-single"
792 ,@(if (string-prefix? "arm" (or (%current-target-system)
794 ;; fftw supports NEON on 32-bit ARM only when compiled
795 ;; for single-precision, so add it here.
798 ,fftw-configure-flags))))
800 (string-append (package-description fftw)
801 " Single-precision version."))))
803 (define-public fftw-openmpi
804 (package (inherit fftw)
805 (name "fftw-openmpi")
807 `(("openmpi" ,openmpi)
808 ,@(package-inputs fftw)))
810 (substitute-keyword-arguments (package-arguments fftw)
811 ((#:configure-flags cf)
812 `(cons "--enable-mpi" ,cf))
813 ((#:phases phases '%standard-phases)
814 `(modify-phases ,phases
815 (add-before 'check 'mpi-setup
818 (string-append (package-description fftw)
819 " With OpenMPI parallelism support."))))
821 (define-public java-la4j
828 (url "https://github.com/vkostyukov/la4j.git")
830 (file-name (string-append name "-" version "-checkout"))
833 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
834 (build-system ant-build-system)
836 `(#:jar-name "la4j.jar"
838 #:test-exclude (list "**/Abstract*.java"
840 "**/DenseMatrixTest.java"
841 "**/SparseMatrixTest.java"
843 "**/SparseVectorTest.java"
844 "**/DenseVectorTest.java")))
846 `(("java-junit" ,java-junit)
847 ("java-hamcrest-core" ,java-hamcrest-core)))
848 (home-page "http://la4j.org/")
849 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
850 (description "The la4j library is a Java library that provides Linear
851 Algebra primitives (matrices and vectors) and algorithms. The key features of
852 the la4j library are:
855 @item No dependencies and tiny size
856 @item Fluent object-oriented/functional API
857 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
858 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
859 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
860 @item MatrixMarket/CSV IO formats support for matrices and vectors
862 (license license:asl2.0)))
864 (define-public java-jlargearrays
866 (name "java-jlargearrays")
870 (uri (string-append "https://repo1.maven.org/maven2/"
871 "pl/edu/icm/JLargeArrays/"
872 version "/JLargeArrays-" version
874 (file-name (string-append name "-" version ".jar"))
877 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
878 (build-system ant-build-system)
880 `(#:jar-name "jlargearrays.jar"
881 #:tests? #f ; tests are not included in the release archive
884 `(("java-commons-math3" ,java-commons-math3)))
885 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
886 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
887 (description "JLargeArrays is a Java library of one-dimensional arrays
888 that can store up to 263 elements.")
889 (license license:bsd-2)))
891 (define-public java-jtransforms
893 (name "java-jtransforms")
897 (uri (string-append "https://repo1.maven.org/maven2/"
898 "com/github/wendykierp/JTransforms/"
899 version "/JTransforms-" version "-sources.jar"))
902 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
903 (build-system ant-build-system)
905 `(#:jar-name "jtransforms.jar"
906 #:tests? #f ; tests are not included in the release archive
909 `(("java-commons-math3" ,java-commons-math3)
910 ("java-jlargearrays" ,java-jlargearrays)))
911 (home-page "https://github.com/wendykierp/JTransforms")
912 (synopsis "Multithreaded FFT library written in pure Java")
913 (description "JTransforms is a multithreaded FFT library written in pure
914 Java. Currently, four types of transforms are available: @dfn{Discrete
915 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
916 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
917 (license license:bsd-2)))
925 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
929 "1qh3yrwn78ms5yhwbpl5wvblk4gbz02cacdygxylr7i9xbrvylkk"))
930 (file-name (string-append name "-" version ".tar.bz2"))
931 (modules '((guix build utils)))
933 ;; There are 3 test failures in the "unsupported" directory,
934 ;; but maintainers say it's a known issue and it's unsupported
935 ;; anyway, so just skip them.
937 (substitute* "unsupported/CMakeLists.txt"
938 (("add_subdirectory\\(test.*")
939 "# Do not build the tests for unsupported features.\n"))
941 (build-system cmake-build-system)
943 '(;; Turn off debugging symbols to save space.
944 #:build-type "Release"
946 #:phases (modify-phases %standard-phases
949 (let* ((cores (parallel-job-count))
950 (dash-j (format #f "-j~a" cores)))
951 (setenv "EIGEN_SEED" "1") ;for reproducibility
952 ;; First build the tests, in parallel. See
953 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
954 (invoke "make" "buildtests" dash-j)
956 ;; Then run 'CTest' with -V so we get more
957 ;; details upon failure.
958 (invoke "ctest" "-V" dash-j)))))))
959 (home-page "https://eigen.tuxfamily.org")
960 (synopsis "C++ template library for linear algebra")
962 "Eigen is a C++ template library for linear algebra: matrices, vectors,
963 numerical solvers, and related algorithms. It provides an elegant API based
964 on \"expression templates\". It is versatile: it supports all matrix sizes,
965 all standard numeric types, various matrix decompositions and geometry
966 features, and more.")
968 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
969 ;; See 'COPYING.README' for details.
970 (license license:mpl2.0)))
972 (define-public eigen-for-tensorflow
973 (let ((changeset "fd6845384b86")
975 (package (inherit eigen)
976 (name "eigen-for-tensorflow")
977 (version (string-append "3.3.5-" revision "." changeset))
981 (url "https://bitbucket.org/eigen/eigen")
982 (changeset changeset)))
985 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
986 (file-name (string-append name "-" version "-checkout"))
987 (modules '((guix build utils)))
989 ;; There are 3 test failures in the "unsupported" directory,
990 ;; but maintainers say it's a known issue and it's unsupported
991 ;; anyway, so just skip them.
993 (substitute* "unsupported/CMakeLists.txt"
994 (("add_subdirectory\\(test.*")
995 "# Do not build the tests for unsupported features.\n"))
998 (define-public xtensor
1005 (url "https://github.com/QuantStack/xtensor.git")
1009 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1010 (file-name (git-file-name name version))))
1011 (build-system cmake-build-system)
1013 `(("googletest" ,googletest)
1017 '("-DBUILD_TESTS=ON")
1018 #:test-target "xtest"))
1019 (home-page "https://quantstack.net/xtensor")
1020 (synopsis "C++ tensors with broadcasting and lazy computing")
1021 (description "xtensor is a C++ library meant for numerical analysis with
1022 multi-dimensional array expressions.
1026 @item an extensible expression system enabling lazy broadcasting.
1027 @item an API following the idioms of the C++ standard library.
1028 @item tools to manipulate array expressions and build upon xtensor.
1030 (license license:bsd-3)))
1039 (uri (string-append "https://www.gap-system.org/pub/gap/gap-"
1040 (version-major+minor version)
1045 (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
1046 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1049 ;; Delete the external gmp and zlib libraries
1050 ;; and a subdirectory not needed for our build.
1051 (for-each delete-file-recursively
1052 '("extern" "hpcgap"))
1053 ;; Delete a failing test.
1054 ;; FIXME: This might be fixed in the next release, see
1055 ;; https://github.com/gap-system/gap/issues/3292
1056 (delete-file "tst/testinstall/dir.tst")
1057 ;; Delete all packages except for a fixed list.
1058 (with-directory-excursion "pkg"
1059 (for-each delete-file-recursively
1060 (lset-difference string=? (scandir ".")
1062 ;; Necessary packages.
1065 "SmallGrp-1.3" ; artistic2.0
1066 "transgrp" ; artistic2.0 for data,
1067 ; gpl2 or gpl3 for code
1068 ;; Recommanded package.
1070 ;; Optional packages, searched for at start,
1071 ;; and their depedencies.
1074 "crisp-1.4.4" ; bsd-2
1075 "ctbllib" ; gpl3+ according to doc/chap0.txt
1078 "irredsol-1.4" ; bsd-2
1085 "tomlib-1.2.7" ; gpl2+, clarified in the git repository
1086 ; and the next release
1089 (build-system gnu-build-system)
1094 `(#:modules ((ice-9 ftw)
1096 (guix build gnu-build-system)
1099 (modify-phases %standard-phases
1100 (add-after 'build 'build-packages
1101 ;; Compile all packages that have not been deleted by the
1102 ;; code snippet above.
1104 (setenv "CONFIG_SHELL" (which "bash"))
1105 (with-directory-excursion "pkg"
1106 (invoke "../bin/BuildPackages.sh")
1108 (add-after 'build-packages 'build-doc
1109 ;; The documentation is bundled, but we create it from source.
1111 (with-directory-excursion "doc"
1112 (invoke "./make_doc"))
1115 (lambda* (#:key outputs #:allow-other-keys)
1116 (let* ((out (assoc-ref outputs "out"))
1117 (bin (string-append out "/bin"))
1118 (lib (string-append out "/lib"))
1119 (prog (string-append bin "/gap"))
1120 (prog-real (string-append bin "/.gap-real"))
1121 (share (string-append out "/share/gap"))
1122 (include (string-append out "/include/gap"))
1123 (include-hpc (string-append include "/hpc")))
1124 ;; Install only the gap binary; the gac compiler is left
1125 ;; for maybe later. "Wrap" it in a shell script that calls
1126 ;; the binary with the correct parameter.
1128 (copy-file "gap" prog-real)
1129 (call-with-output-file prog
1132 "#!~a~%exec ~a -l ~a \"$@\"~%"
1137 ;; Install the headers, which are needed by Sage. The
1138 ;; Makefile target "install-headers" was available in
1139 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1140 (mkdir-p include-hpc)
1141 (install-file "gen/config.h" include)
1142 (let ((file-name-predicate-without-stat
1144 (cut (file-name-predicate regex) <> #f))))
1145 (with-directory-excursion "src"
1147 (cut install-file <> include)
1149 (file-name-predicate-without-stat ".*\\.h$"))))
1150 (with-directory-excursion "src/hpc"
1152 (cut install-file <> include-hpc)
1154 (file-name-predicate-without-stat ".*\\.h$")))))
1155 ;; Install the library, which is needed by Sage. The
1156 ;; Makefile target "install-libgap" was available in
1157 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1158 ;; Compared to the Makefile, which used libtool, the
1159 ;; following approach of copying files and making symlinks
1160 ;; is rather pedestrian. There is hope that some later
1161 ;; version of gap reinstates and completes the install
1163 (invoke "make" "libgap.la")
1164 (install-file "libgap.la" lib)
1165 (install-file ".libs/libgap.so.0.0.0" lib)
1166 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so"))
1167 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so.0"))
1168 ;; Install a certain number of files and directories to
1169 ;; SHARE, where the wrapped shell script expects them.
1170 ;; Remove information on the build directory from sysinfo.gap.
1171 (substitute* "sysinfo.gap"
1172 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1173 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1174 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1175 (install-file "sysinfo.gap" share)
1176 (copy-recursively "grp" (string-append share "/grp"))
1177 (copy-recursively "pkg" (string-append share "/pkg"))
1178 ;; The following is not the C library libgap.so, but a
1179 ;; library of GAP code.
1180 (copy-recursively "lib" (string-append share "/lib"))
1181 ;; The gap binary looks for documentation inside SHARE.
1182 (copy-recursively "doc" (string-append share "/doc")))
1184 (home-page "https://www.gap-system.org/")
1186 "System for computational group theory")
1188 "GAP is a system for computational discrete algebra, with particular
1189 emphasis on computational group theory. It provides a programming language,
1190 a library of thousands of functions implementing algebraic algorithms
1191 written in the GAP language as well as large data libraries of algebraic
1193 ;; Some packages have different licenses (effectively forcing the
1194 ;; combined work to be licensed as gpl3+); if this is the case, this
1195 ;; is mentioned above next to their name.
1196 ;; Some packages have no license mentioned explicitly; supposedly this
1197 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1198 ;; safe side, we drop them for now.
1199 (license license:gpl2+)))
1201 (define-public givaro
1208 (url "https://github.com/linbox-team/givaro")
1209 (commit (string-append "v" version))))
1210 (file-name (git-file-name name version))
1213 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1214 (build-system gnu-build-system)
1216 `(("autoconf" ,autoconf)
1217 ("automake" ,automake)
1218 ("libtool" ,libtool)))
1220 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1221 (synopsis "Algebraic computations with exact rings and fields")
1223 "Givaro is a C++ library implementing the basic arithmetic of various
1224 algebraic objects: prime fields, extension fields, finite fields, finite
1225 rings, polynomials, algebraic numbers, arbitrary precision integers and
1226 rationals (C++ wrappers over gmp), fixed precision integers. It also
1227 provides data-structures and templated classes for the manipulation of
1228 compound objects, such as vectors, matrices and univariate polynomials.")
1229 (license license:cecill-b)
1230 (home-page "https://github.com/linbox-team/givaro")))
1232 (define-public fflas-ffpack
1234 (name "fflas-ffpack")
1239 (url "https://github.com/linbox-team/fflas-ffpack")
1241 (file-name (git-file-name name version))
1244 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1245 (build-system gnu-build-system)
1247 `(("autoconf" ,autoconf)
1248 ("automake" ,automake)
1249 ("libtool" ,libtool)
1250 ("pkg-config" ,pkg-config)))
1252 `(("openblas" ,openblas)))
1254 `(("givaro" ,givaro))) ; required according to the .pc file
1257 (list (string-append "--with-blas-libs="
1258 (assoc-ref %build-inputs "openblas")
1259 "/lib/libopenblas.so"))))
1260 (synopsis "C++ library for linear algebra over finite fields")
1262 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1263 operations over a finite field.
1264 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1265 of a subset of routines of the numerical BLAS; it also supports sparse
1266 matrix-vector products.
1267 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1268 library to provide functionalities of higher level, using the kernel
1269 of a BLAS. Additionally, it provides routines specific to exact linear
1270 algebra, such as the row echelon form.")
1271 (license license:lgpl2.1+)
1272 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1274 (define-public linbox
1281 (url "https://github.com/linbox-team/linbox")
1282 (commit (string-append "v" version))))
1283 (file-name (git-file-name name version))
1286 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))))
1287 (build-system gnu-build-system)
1289 `(("autoconf" ,autoconf)
1290 ("automake" ,automake)
1291 ("libtool" ,libtool)
1292 ("pkg-config" ,pkg-config)))
1294 `(("fflas-ffpack" ,fflas-ffpack)))
1295 (synopsis "C++ library for linear algebra over exact rings")
1297 "LinBox is a C++ template library for exact linear algebra computation
1298 with dense, sparse, and structured matrices over the integers and over
1300 (license license:lgpl2.1+)
1301 (home-page "https://linbox-team.github.io/linbox/")))
1306 (version "20140914")
1310 (url "https://bitbucket.org/malb/m4ri")
1311 (commit (string-append "release-" version))))
1312 (file-name (git-file-name name version))
1315 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1316 (build-system gnu-build-system)
1318 `(("autoconf" ,autoconf)
1319 ("automake" ,automake)
1320 ("libtool" ,libtool)
1321 ("pkg-config" ,pkg-config)))
1323 `(("libpng" ,libpng)))
1324 (synopsis "Arithmetic of dense matrices over F_2")
1325 (description "M4RI is a library for fast arithmetic with dense matrices
1326 over F2. The name M4RI comes from the first implemented algorithm: The
1327 Method of the Four Russians inversion algorithm published by Gregory Bard.
1328 This algorithm in turn is named after the Method of the Four Russians
1329 multiplication algorithm.")
1330 (license license:gpl2+)
1331 (home-page "https://bitbucket.org/malb/m4ri/")))
1333 (define-public symmetrica
1338 (method url-fetch/tarbomb)
1339 (uri (let ((v (string-join (string-split version #\.) "_")))
1340 (string-append "http://www.algorithm.uni-bayreuth.de/"
1341 "en/research/SYMMETRICA/"
1342 "SYM" v "_tar.gz")))
1345 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1346 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1347 (patches (search-patches "symmetrica-bruch.patch"
1348 "symmetrica-int32.patch"
1349 "symmetrica-return_values.patch"
1350 "symmetrica-sort_sum_rename.patch"))))
1351 (build-system gnu-build-system)
1353 `(#:tests? #f ;no test
1355 (modify-phases %standard-phases
1356 (add-after 'unpack 'fix-makefile
1358 (substitute* "makefile"
1359 (("cc -c") "gcc -c -fPIC"))
1361 (add-after 'fix-makefile 'turn-off-banner
1364 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1366 (delete 'configure) ;no configure script
1367 (replace 'install ;no install target
1368 (lambda* (#:key outputs #:allow-other-keys)
1369 (let* ((out (assoc-ref outputs "out"))
1370 (lib (string-append out "/lib"))
1371 (inc (string-append out "/include/symmetrica"))
1372 (doc (string-append out "/share/doc/symmetrica-" ,version))
1373 (static "libsymmetrica.a"))
1374 ;; Build static library.
1375 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1376 (invoke "ranlib" static)
1377 ;; Install static library and headers.
1378 (for-each (lambda (f) (install-file f inc))
1379 (find-files "." "\\.h$"))
1380 (install-file "libsymmetrica.a" lib)
1381 ;; Install documentation.
1382 (for-each (lambda (f) (install-file f doc))
1383 (find-files "." "\\.doc$"))
1385 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1386 (synopsis "Combinatoric C Library")
1387 (description "Symmetrica is a library for combinatorics. It has support
1388 for the representation theory of the symmetric group and related groups,
1389 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1390 polynomials, and the representation theory of Hecke algebras of type A_n.")
1391 (license license:public-domain)))
1393 (define-public m4rie
1396 (version "20150908")
1400 (url "https://bitbucket.org/malb/m4rie")
1401 (commit (string-append "release-" version))))
1402 (file-name (git-file-name name version))
1405 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1406 (build-system gnu-build-system)
1408 `(("autoconf" ,autoconf)
1409 ("automake" ,automake)
1410 ("libtool" ,libtool)))
1413 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1414 (description "M4RI is a library for fast arithmetic with dense matrices
1415 over finite fields of characteristic 2. So it extends the functionality
1416 of M4RI from F_2 to F_{2^e}.")
1417 (license license:gpl2+)
1418 (home-page "https://bitbucket.org/malb/m4rie/")))
1420 (define-public eclib
1423 (version "20190909")
1427 (url "https://github.com/JohnCremona/eclib/")
1428 (commit (string-append "v" version))))
1429 (file-name (git-file-name name version))
1432 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1433 (build-system gnu-build-system)
1435 `(("autoconf" ,autoconf)
1436 ("automake" ,automake)
1437 ("libtool" ,libtool)))
1441 ("pari-gp" ,pari-gp)))
1442 (synopsis "Ranks of elliptic curves and modular symbols")
1443 (description "The eclib package includes mwrank (for 2-descent on
1444 elliptic curves over Q) and modular symbol code; it has been written by
1445 John Cremona to compute his elliptic curve database.")
1446 (license license:gpl2+)
1447 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1448 "J.E.Cremona/mwrank/index.html"))))
1450 (define-public lrcalc
1457 (url "https://bitbucket.org/asbuch/lrcalc")
1458 (commit (string-append "lrcalc-" version))))
1459 (file-name (git-file-name name version))
1462 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1463 (patches (search-patches "lrcalc-includes.patch"))))
1464 (build-system gnu-build-system)
1466 `(("autoconf" ,autoconf)
1467 ("automake" ,automake)
1468 ("libtool" ,libtool)))
1471 (modify-phases %standard-phases
1472 (add-before 'build 'fix-permission
1474 (chmod "lrcalc.maple.src" #o644)
1476 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1477 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1478 program designed to compute Littlewood-Richardson coefficients. It computes
1479 single Littlewood-Richardson coefficients, products of Schur functions, or
1480 skew Schur functions. In addition it computes products in the small quantum
1481 cohomology ring of a Grassmann variety. The software package also includes
1482 a program that performs fast computation of the more general multiplicative
1483 structure constants of Schubert polynomials.")
1484 (license license:gpl2+)
1485 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1494 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1495 version ".tar.bz2"))
1498 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1499 (build-system gnu-build-system)
1502 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1503 ; mentions ATLAS in particular
1508 (string-append "--with-gmp-include="
1509 (assoc-ref %build-inputs "gmp") "/include")
1510 (string-append "--with-gmp-lib="
1511 (assoc-ref %build-inputs "gmp") "/lib")
1512 "--with-cblas=-lopenblas"
1513 (string-append "--with-cblas-include="
1514 (assoc-ref %build-inputs "cblas") "/include")
1515 (string-append "--with-cblas-lib="
1516 (assoc-ref %build-inputs "cblas") "/lib"))))
1517 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1519 "Solver for systems of linear equations over the integers")
1521 "IML is a C library implementing algorithms for computing exact
1522 solutions to dense systems of linear equations over the integers.
1523 Currently, IML provides the following functionality:
1526 @item Nonsingular rational system solving:
1527 compute the unique rational solution X to the system AX=B, where A and B
1528 are integer matrices, A nonsingular.
1529 @item Compute the right nullspace or kernel of an integer matrix.
1530 @item Certified linear system solving:
1531 compute a minimal denominator solution x to a system Ax=b, where b is an
1532 integer vector and A is an integer matrix with arbitrary shape and
1536 In addition, IML provides some low level routines for a variety of mod p
1537 matrix operations: computing the row-echelon form, determinant, rank
1538 profile, and inverse of a mod p matrix. These mod p routines are not
1539 general purpose; they require that p satisfy some preconditions based on
1540 the dimension of the input matrix (usually p should be prime and should be
1541 no more than about 20 bits long).")
1542 (license license:bsd-3)))