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>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages algebra)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages bison)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages cpp)
34 #:use-module (gnu packages documentation)
35 #:use-module (gnu packages ed)
36 #:use-module (gnu packages flex)
37 #:use-module (gnu packages fltk)
38 #:use-module (gnu packages gl)
39 #:use-module (gnu packages graphviz)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages java)
42 #:use-module (gnu packages maths)
43 #:use-module (gnu packages mpi)
44 #:use-module (gnu packages multiprecision)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages pulseaudio)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages python-xyz)
50 #:use-module (gnu packages readline)
51 #:use-module (gnu packages shells)
52 #:use-module (gnu packages tex)
53 #:use-module (gnu packages texinfo)
54 #:use-module (gnu packages xiph)
55 #:use-module (gnu packages xorg)
56 #:use-module (guix build-system ant)
57 #:use-module (guix build-system gnu)
58 #:use-module (guix build-system cmake)
59 #:use-module (guix build-system python)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix hg-download)
63 #:use-module ((guix licenses) #:prefix license:)
64 #:use-module (guix packages)
65 #:use-module (guix utils))
75 "http://www.multiprecision.org/downloads/mpfrcx-"
79 "1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
80 (build-system gnu-build-system)
84 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
85 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
87 "Mpfrcx is a library for the arithmetic of univariate polynomials over
88 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
89 on the rounding. For the time being, only the few functions needed to
90 implement the floating point approach to complex multiplication are
91 implemented. On the other hand, these comprise asymptotically fast
92 multiplication routines such as Toom–Cook and the FFT.")
93 (license license:lgpl3+)
94 (home-page "http://mpfrcx.multiprecision.org/")))
103 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
107 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
108 (build-system gnu-build-system)
109 (synopsis "Arithmetic of polynomials over binary finite fields")
111 "The gf2x library provides arithmetic of polynomials over finite fields
112 of characteristic 2. It implements the multiplication, squaring and
113 greatest common divisor operations.")
114 (license license:gpl3+)
115 (home-page "https://gforge.inria.fr/projects/gf2x/")))
124 "http://www.multiprecision.org/cm/download/cm-"
128 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
129 (build-system gnu-build-system)
132 ("zlib" ,zlib))) ; Header files included from cm_common.h.
134 `(("pari-gp" ,pari-gp)))
135 (synopsis "CM constructions for elliptic curves")
137 "The CM software implements the construction of ring class fields of
138 imaginary quadratic number fields and of elliptic curves with complex
139 multiplication via floating point approximations. It consists of libraries
140 that can be called from within a C program and of executable command
142 (license license:gpl3+)
143 (home-page "http://cm.multiprecision.org/")))
152 (url "https://github.com/fplll/fplll.git")
154 (file-name (git-file-name name version))
157 "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg"))))
158 (build-system gnu-build-system)
160 `(("autoconf" ,autoconf)
161 ("automake" ,automake)
162 ("libtool" ,libtool)))
166 (home-page "https://github.com/fplll/fplll")
167 (synopsis "Library for LLL-reduction of euclidean lattices")
169 "fplll contains implementations of several lattice algorithms.
170 The implementation relies on floating-point orthogonalization, and LLL
171 is central to the code, hence the name.
173 It includes implementations of floating-point LLL reduction
174 algorithms, offering different speed/guarantees ratios. It contains
175 a @emph{wrapper} choosing the estimated best sequence of variants in
176 order to provide a guaranteed output as fast as possible. In the case
177 of the wrapper, the succession of variants is oblivious to the user.
179 It includes an implementation of the BKZ reduction algorithm,
180 including the BKZ-2.0 improvements (extreme enumeration
181 pruning, pre-processing of blocks, early termination). Additionally,
182 Slide reduction and self dual BKZ are supported.
184 It also includes a floating-point implementation of the
185 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
186 vector. For the same task, the GaussSieve algorithm is also available
187 in fplll. Finally, it contains a variant of the enumeration algorithm
188 that computes a lattice vector closest to a given vector belonging to
189 the real span of the lattice.")
190 (license license:lgpl2.1+)))
192 (define-public python-fpylll
194 (name "python-fpylll")
198 ;; Pypi contains and older release, so we use a tagged release from
202 (url "https://github.com/fplll/fpylll.git")
203 (commit (string-append version "dev"))))
206 "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
207 (build-system python-build-system)
212 ("pari-gp" ,pari-gp)))
214 `(("cysignals" ,python-cysignals)
215 ("cython" ,python-cython)
216 ("flake8" ,python-flake8)
217 ("numpy" ,python-numpy)
218 ("pytest" ,python-pytest)))
219 (home-page "https://github.com/fplll/fpylll")
220 (synopsis "Python interface for fplll")
221 (description "fpylll is a Python wrapper for fplll.")
222 (license license:gpl2+)))
224 (define-public pari-gp
231 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
235 "0fck8ssmirl8fy7s4mspgrxjs5sag76xbshqlqzkcl3kqyrk4raa"))))
236 (build-system gnu-build-system)
238 `(("texlive" ,(texlive-union
239 (list texlive-amsfonts)))))
240 (inputs `(("gmp" ,gmp)
243 ("readline" ,readline)))
245 '(#:make-flags '("all")
246 #:test-target "dobench"
248 (modify-phases %standard-phases
250 (lambda* (#:key outputs #:allow-other-keys)
251 (invoke "./Configure"
252 (string-append "--prefix="
253 (assoc-ref outputs "out"))))))))
254 (synopsis "PARI/GP, a computer algebra system for number theory")
256 "PARI/GP is a widely used computer algebra system designed for fast
257 computations in number theory (factorisations, algebraic number theory,
258 elliptic curves...), but it also contains a large number of other useful
259 functions to compute with mathematical entities such as matrices,
260 polynomials, power series, algebraic numbers, etc., and a lot of
261 transcendental functions.
262 PARI is also available as a C library to allow for faster computations.")
263 (license license:gpl2+)
264 (home-page "https://pari.math.u-bordeaux.fr/")))
269 (version "0.0.11pl2")
273 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
277 "0wqsf05wgkqvmmsx7jinvzdqav6rl56sr8haibgs31nzz4x9xz9g"))))
278 (build-system gnu-build-system)
279 (native-inputs `(("perl" ,perl)))
280 (inputs `(("pari-gp" ,pari-gp)))
283 (list (string-append "--with-paricfg="
284 (assoc-ref %build-inputs "pari-gp")
285 "/lib/pari/pari.cfg"))))
286 (synopsis "PARI/GP, a computer algebra system for number theory")
288 "PARI/GP is a widely used computer algebra system designed for fast
289 computations in number theory (factorisations, algebraic number theory,
290 elliptic curves...), but it also contains a large number of other useful
291 functions to compute with mathematical entities such as matrices,
292 polynomials, power series, algebraic numbers, etc., and a lot of
293 transcendental functions.
294 PARI is also available as a C library to allow for faster computations.
296 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
297 (license license:gpl2)
298 (home-page "https://pari.math.u-bordeaux.fr/")))
309 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
312 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
321 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
325 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
326 (build-system gnu-build-system)
332 ("fplll" ,fplll-4-cmh)
333 ("pari-gp" ,pari-gp)))
334 (synopsis "Igusa class polynomial computations")
336 "The CMH software computes Igusa (genus 2) class polynomials, which
337 parameterize the CM points in the moduli space of 2-dimensional abelian
338 varieties, i.e. Jacobians of hyperelliptic curves.
339 It can also be used to compute theta constants at arbitrary
341 (license license:gpl3+)
342 (home-page "http://cmh.gforge.inria.fr/")))
350 ;; "~parisse/giac" is not used because the maintainer regularly
351 ;; overwrites the release tarball there, introducing a checksum
352 ;; mismatch every time. See
353 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
354 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
355 "~parisse/debian/dists/stable/main/"
356 "source/giac_" version ".tar.gz"))
359 "1jp7awyp8j8w6fhn802z8ddbq1fxhkyk9xdf0mq0mm0chpkylwqk"))))
360 (build-system gnu-build-system)
362 `(#:modules ((ice-9 ftw)
364 (guix build gnu-build-system))
366 (modify-phases %standard-phases
367 (add-after 'unpack 'patch-bin-cp
368 ;; Some Makefiles contain hard-coded "/bin/cp".
370 (substitute* (find-files "doc" "^Makefile")
371 (("/bin/cp") (which "cp")))
373 (add-after 'unpack 'disable-failing-test
374 ;; FIXME: Test failing. Not sure why.
376 (substitute* "check/Makefile.in"
379 (add-after 'install 'fix-doc
380 (lambda* (#:key outputs #:allow-other-keys)
381 (let ((out (assoc-ref outputs "out")))
382 ;; Most French documentation has a non-commercial
383 ;; license, so we need to remove it.
384 (with-directory-excursion (string-append out "/share/giac/doc/fr")
385 (for-each delete-file-recursively
386 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
388 ;; Remove duplicate documentation in
389 ;; "%out/share/doc/giac/", where Xcas does not expect
391 (delete-file-recursively (string-append out "/share/doc/giac"))
393 (add-after 'install 'remove-unnecessary-executable
394 (lambda* (#:key outputs #:allow-other-keys)
395 (let ((out (assoc-ref outputs "out")))
396 (delete-file (string-append out "/bin/xcasnew"))
399 ;;; TODO: Add libnauty.
408 ("libsamplerate" ,libsamplerate)
410 ("libxinerama" ,libxinerama)
423 ("readline" ,readline)
424 ("texlive" ,texlive-tiny)))
425 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
426 (synopsis "Computer algebra system")
428 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
429 maple, mupad and the TI89. It is available as a standalone program (graphic
430 or text interfaces) or as a C++ library.")
431 (license license:gpl3+)))
433 (define-public giac-xcas
434 (deprecated-package "giac-xcas" giac))
443 "http://flintlib.org/flint-"
446 "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
447 (patches (search-patches "flint-ldconfig.patch"))))
448 (build-system gnu-build-system)
451 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
453 `(#:parallel-tests? #f ; seems to be necessary on arm
455 (modify-phases %standard-phases
457 (lambda* (#:key inputs outputs #:allow-other-keys)
458 (let ((out (assoc-ref outputs "out"))
459 (gmp (assoc-ref inputs "gmp"))
460 (mpfr (assoc-ref inputs "mpfr")))
461 ;; do not pass "--enable-fast-install", which makes the
462 ;; homebrew configure process fail
463 (invoke "./configure"
464 (string-append "--prefix=" out)
465 (string-append "--with-gmp=" gmp)
466 (string-append "--with-mpfr=" mpfr))
468 (synopsis "Fast library for number theory")
470 "FLINT is a C library for number theory. It supports arithmetic
471 with numbers, polynomials, power series and matrices over many base
472 rings, including multiprecision integers and rationals, integers
473 modulo n, p-adic numbers, finite fields (prime and non-prime order)
474 and real and complex numbers (via the Arb extension library).
476 Operations that can be performed include conversions, arithmetic,
477 GCDs, factoring, solving linear systems, and evaluating special
478 functions. In addition, FLINT provides various low-level routines for
480 (license license:gpl2+)
481 (home-page "http://flintlib.org/")))
490 (url "https://github.com/fredrik-johansson/arb.git")
492 (file-name (git-file-name name version))
495 "0478671wfwy3gl26sbxh1jq1ih36z4k72waa8y2y2lvn649gb7cd"))))
496 (build-system gnu-build-system)
498 `(("flint" ,flint))) ; flint.h is included by arf.h
504 (modify-phases %standard-phases
506 (lambda* (#:key inputs outputs #:allow-other-keys)
507 (let ((out (assoc-ref outputs "out"))
508 (flint (assoc-ref inputs "flint"))
509 (gmp (assoc-ref inputs "gmp"))
510 (mpfr (assoc-ref inputs "mpfr")))
511 ;; do not pass "--enable-fast-install", which makes the
512 ;; homebrew configure process fail
513 (invoke "./configure"
514 (string-append "--prefix=" out)
515 (string-append "--with-flint=" flint)
516 (string-append "--with-gmp=" gmp)
517 (string-append "--with-mpfr=" mpfr))))))))
518 (synopsis "Arbitrary precision floating-point ball arithmetic")
520 "Arb is a C library for arbitrary-precision floating-point ball
521 arithmetic. It supports efficient high-precision computation with
522 polynomials, power series, matrices and special functions over the
523 real and complex numbers, with automatic, rigorous error control.")
524 (license license:lgpl2.1+)
525 (home-page "http://fredrikj.net/arb/")))
527 (define-public python-flint
529 (name "python-flint")
534 (url "https://github.com/fredrik-johansson/python-flint.git")
536 (file-name (git-file-name name version))
539 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
540 (patches (search-patches "python-flint-includes.patch"))))
541 (build-system python-build-system)
543 `(("python-cython" ,python-cython)))
545 `(("python-numpy" ,python-numpy)))
549 (synopsis "Python module wrapping ARB and FLINT")
551 "Python-flint is a Python extension module wrapping FLINT
552 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
553 arithmetic). It supports integers, rationals, modular integers,
554 real and complex ball arithmetic, polynomials and matrices over all
555 these types and other mathematical functions.")
556 (license license:expat)
557 (home-page "http://fredrikj.net/python-flint/")))
565 (uri (string-append "http://shoup.net/ntl/ntl-"
568 "115frp5flyvw9wghz4zph1b3llmr5nbxk1skgsggckr81fh3gmxq"))))
569 (build-system gnu-build-system)
571 `(("libtool" ,libtool)
572 ("perl" ,perl))) ; for configuration
573 ;; FIXME: Add optional input gf2x once available; then also add
574 ;; configure flag "NTL_GF2X_LIB=on".
579 (modify-phases %standard-phases
581 (lambda* (#:key outputs #:allow-other-keys)
583 (system* "./configure"
584 (string-append "PREFIX=" (assoc-ref outputs "out"))
585 ;; Do not build especially for the build machine.
587 ;; Also do not tune to the build machine.
591 (synopsis "C++ library for number theory")
593 "NTL is a C++ library providing data structures and algorithms
594 for manipulating signed, arbitrary length integers, and for vectors,
595 matrices, and polynomials over the integers and over finite fields.")
596 (license license:gpl2+)
597 (home-page "http://shoup.net/ntl/")))
599 (define-public singular
607 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
611 (string-trim-right version #\p
612 0 (1- (string-length version)))
614 "/singular-" version ".tar.gz"))
616 "0kvd55353fiqyq1msmi0kka66n5h0aqs7m3km60r01b1w2f8085m"))))
617 (build-system gnu-build-system)
619 `(("doxygen" ,doxygen)
620 ("graphviz" ,graphviz)
629 ("readline" ,readline)))
632 (list (string-append "--with-ntl="
633 (assoc-ref %build-inputs "ntl")))))
634 (synopsis "Computer algebra system for polynomial computations")
636 "Singular is a computer algebra system for polynomial computations,
637 with special emphasis on commutative and non-commutative algebra, algebraic
638 geometry and singularity theory.")
639 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
640 ;; libraries with which it links are licensed under lgpl3+, so the
641 ;; combined work becomes gpl3. See COPYING in the source code.
642 (license license:gpl3)
643 (home-page "http://www.singular.uni-kl.de/index.php")))
645 (define-public gmp-ecm
651 ;; Use the ‘Latest version’ link for a stable URI across releases.
652 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
653 "latestfile/160/ecm-" version ".tar.gz"))
655 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
656 (build-system gnu-build-system)
660 `(#:configure-flags '("--enable-shared"
661 ;; Disable specific assembly routines, which depend
662 ;; on the subarchitecture of the build machine,
663 ;; and use gmp instead.
664 "--disable-asm-redc")))
665 (synopsis "Integer factorization library using the elliptic curve method")
667 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
668 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
670 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
671 ;; so the combined work is under gpl3+.
672 (license license:gpl3+)
673 (home-page "http://ecm.gforge.inria.fr/")))
681 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
684 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))))
685 (build-system gnu-build-system)
689 ("texinfo" ,texinfo)))
692 (list "--with-readline")))
693 (home-page "https://www.gnu.org/software/bc/")
694 (synopsis "Arbitrary precision numeric processing language")
696 "bc is an arbitrary precision numeric processing language. It includes
697 an interactive environment for evaluating mathematical statements. Its
698 syntax is similar to that of C, so basic usage is familiar. It also includes
699 \"dc\", a reverse-polish calculator.")
700 (license license:gpl2+)))
702 ;; The original kiss-fft does not have a complete build system and does not
703 ;; build any shared libraries. This is a fork used by Extempore.
704 (define-public kiss-fft-for-extempore
706 (name "kiss-fft-for-extempore")
711 (url "https://github.com/extemporelang/kiss_fft.git")
713 (file-name (git-file-name name version))
716 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
717 (build-system cmake-build-system)
718 (arguments `(#:tests? #f)) ; no tests included
719 ;; Extempore refuses to build on architectures other than x86_64
720 (supported-systems '("x86_64-linux"))
721 (home-page "https://github.com/extemporelang/kiss_fft")
722 (synopsis "Mixed-radix Fast Fourier Transform")
724 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
725 that can use fixed or floating data types and can easily be incorporated into
727 (license license:bsd-3)))
735 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
739 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
740 (build-system gnu-build-system)
743 '("--enable-shared" "--enable-openmp" "--enable-threads"
744 ,@(let ((system (or (%current-target-system) (%current-system))))
745 ;; Enable SIMD extensions for codelets. See details at:
746 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
748 ((string-prefix? "x86_64" system)
749 '("--enable-sse2" "--enable-avx" "--enable-avx2"
750 "--enable-avx512" "--enable-avx-128-fma"))
751 ((string-prefix? "i686" system)
753 ((string-prefix? "aarch64" system)
754 ;; Note that fftw supports NEON on 32-bit ARM only when
755 ;; compiled for single-precision.
759 ;; By default '-mtune=native' is used. However, that may cause the
760 ;; use of ISA extensions (e.g. AVX) that are not necessarily
761 ;; available on the user's machine when that package is built on a
762 ;; different machine.
763 "ax_cv_c_flags__mtune_native=no")))
764 (native-inputs `(("perl" ,perl)))
765 (home-page "http://fftw.org")
766 (synopsis "Computing the discrete Fourier transform")
768 "FFTW is a C subroutine library for computing the discrete Fourier
769 transform (DFT) in one or more dimensions, of arbitrary input size, and of
770 both real and complex data (as well as of even/odd data---i.e. the discrete
771 cosine/ sine transforms or DCT/DST).")
772 (license license:gpl2+)))
775 (package (inherit fftw)
778 (substitute-keyword-arguments (package-arguments fftw)
779 ((#:configure-flags fftw-configure-flags)
780 `(cons* "--enable-single"
781 ,@(if (string-prefix? "arm" (or (%current-target-system)
783 ;; fftw supports NEON on 32-bit ARM only when compiled
784 ;; for single-precision, so add it here.
787 ,fftw-configure-flags))))
789 (string-append (package-description fftw)
790 " Single-precision version."))))
792 (define-public fftw-openmpi
793 (package (inherit fftw)
794 (name "fftw-openmpi")
796 `(("openmpi" ,openmpi)
797 ,@(package-inputs fftw)))
799 (substitute-keyword-arguments (package-arguments fftw)
800 ((#:configure-flags cf)
801 `(cons "--enable-mpi" ,cf))
802 ((#:phases phases '%standard-phases)
803 `(modify-phases ,phases
804 (add-before 'check 'mpi-setup
807 (string-append (package-description fftw)
808 " With OpenMPI parallelism support."))))
810 (define-public java-la4j
817 (url "https://github.com/vkostyukov/la4j.git")
819 (file-name (string-append name "-" version "-checkout"))
822 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
823 (build-system ant-build-system)
825 `(#:jar-name "la4j.jar"
827 #:test-exclude (list "**/Abstract*.java"
829 "**/DenseMatrixTest.java"
830 "**/SparseMatrixTest.java"
832 "**/SparseVectorTest.java"
833 "**/DenseVectorTest.java")))
835 `(("java-junit" ,java-junit)
836 ("java-hamcrest-core" ,java-hamcrest-core)))
837 (home-page "http://la4j.org/")
838 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
839 (description "The la4j library is a Java library that provides Linear
840 Algebra primitives (matrices and vectors) and algorithms. The key features of
841 the la4j library are:
844 @item No dependencies and tiny size
845 @item Fluent object-oriented/functional API
846 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
847 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
848 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
849 @item MatrixMarket/CSV IO formats support for matrices and vectors
851 (license license:asl2.0)))
853 (define-public java-jlargearrays
855 (name "java-jlargearrays")
859 (uri (string-append "http://search.maven.org/remotecontent?"
860 "filepath=pl/edu/icm/JLargeArrays/"
861 version "/JLargeArrays-" version
863 (file-name (string-append name "-" version ".jar"))
866 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
867 (build-system ant-build-system)
869 `(#:jar-name "jlargearrays.jar"
870 #:tests? #f ; tests are not included in the release archive
873 `(("java-commons-math3" ,java-commons-math3)))
874 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
875 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
876 (description "JLargeArrays is a Java library of one-dimensional arrays
877 that can store up to 263 elements.")
878 (license license:bsd-2)))
880 (define-public java-jtransforms
882 (name "java-jtransforms")
886 (uri (string-append "http://search.maven.org/remotecontent?"
887 "filepath=com/github/wendykierp/JTransforms/"
888 version "/JTransforms-" version "-sources.jar"))
891 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
892 (build-system ant-build-system)
894 `(#:jar-name "jtransforms.jar"
895 #:tests? #f ; tests are not included in the release archive
898 `(("java-commons-math3" ,java-commons-math3)
899 ("java-jlargearrays" ,java-jlargearrays)))
900 (home-page "https://github.com/wendykierp/JTransforms")
901 (synopsis "Multithreaded FFT library written in pure Java")
902 (description "JTransforms is a multithreaded FFT library written in pure
903 Java. Currently, four types of transforms are available: @dfn{Discrete
904 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
905 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
906 (license license:bsd-2)))
914 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
918 "1qh3yrwn78ms5yhwbpl5wvblk4gbz02cacdygxylr7i9xbrvylkk"))
919 (file-name (string-append name "-" version ".tar.bz2"))
920 (modules '((guix build utils)))
922 ;; There are 3 test failures in the "unsupported" directory,
923 ;; but maintainers say it's a known issue and it's unsupported
924 ;; anyway, so just skip them.
926 (substitute* "unsupported/CMakeLists.txt"
927 (("add_subdirectory\\(test.*")
928 "# Do not build the tests for unsupported features.\n"))
930 (build-system cmake-build-system)
932 '(;; Turn off debugging symbols to save space.
933 #:build-type "Release"
935 #:phases (modify-phases %standard-phases
938 (let* ((cores (parallel-job-count))
939 (dash-j (format #f "-j~a" cores)))
940 (setenv "EIGEN_SEED" "1") ;for reproducibility
941 ;; First build the tests, in parallel. See
942 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
943 (invoke "make" "buildtests" dash-j)
945 ;; Then run 'CTest' with -V so we get more
946 ;; details upon failure.
947 (invoke "ctest" "-V" dash-j)))))))
948 (home-page "https://eigen.tuxfamily.org")
949 (synopsis "C++ template library for linear algebra")
951 "Eigen is a C++ template library for linear algebra: matrices, vectors,
952 numerical solvers, and related algorithms. It provides an elegant API based
953 on \"expression templates\". It is versatile: it supports all matrix sizes,
954 all standard numeric types, various matrix decompositions and geometry
955 features, and more.")
957 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
958 ;; See 'COPYING.README' for details.
959 (license license:mpl2.0)))
961 (define-public eigen-for-tensorflow
962 (let ((changeset "fd6845384b86")
964 (package (inherit eigen)
965 (name "eigen-for-tensorflow")
966 (version (string-append "3.3.5-" revision "." changeset))
970 (url "https://bitbucket.org/eigen/eigen")
971 (changeset changeset)))
974 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
975 (file-name (string-append name "-" version "-checkout"))
976 (modules '((guix build utils)))
978 ;; There are 3 test failures in the "unsupported" directory,
979 ;; but maintainers say it's a known issue and it's unsupported
980 ;; anyway, so just skip them.
982 (substitute* "unsupported/CMakeLists.txt"
983 (("add_subdirectory\\(test.*")
984 "# Do not build the tests for unsupported features.\n"))
987 (define-public xtensor
994 (url "https://github.com/QuantStack/xtensor.git")
998 "0kkc4ar7p2d94jnclmrh46dwv7ldy9lx630vm9gci3pp4hnhbj9f"))
999 (file-name (git-file-name name version))))
1000 (build-system cmake-build-system)
1002 `(("googletest" ,googletest)
1006 '("-DBUILD_TESTS=ON")
1007 #:test-target "xtest"))
1008 (home-page "http://quantstack.net/xtensor")
1009 (synopsis "C++ tensors with broadcasting and lazy computing")
1010 (description "xtensor is a C++ library meant for numerical analysis with
1011 multi-dimensional array expressions.
1015 @item an extensible expression system enabling lazy broadcasting.
1016 @item an API following the idioms of the C++ standard library.
1017 @item tools to manipulate array expressions and build upon xtensor.
1019 (license license:bsd-3)))
1028 (uri (string-append "https://www.gap-system.org/pub/gap/gap-"
1029 (version-major+minor version)
1034 (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
1035 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1038 ;; Delete the external gmp and zlib libraries
1039 ;; and a subdirectory not needed for our build.
1040 (for-each delete-file-recursively
1041 '("extern" "hpcgap"))
1042 ;; Delete a failing test.
1043 ;; FIXME: This might be fixed in the next release, see
1044 ;; https://github.com/gap-system/gap/issues/3292
1045 (delete-file "tst/testinstall/dir.tst")
1046 ;; Delete all packages except for a fixed list.
1047 (with-directory-excursion "pkg"
1048 (for-each delete-file-recursively
1049 (lset-difference string=? (scandir ".")
1051 ;; Necessary packages.
1054 "SmallGrp-1.3" ; artistic2.0
1055 "transgrp" ; artistic2.0 for data,
1056 ; gpl2 or gpl3 for code
1057 ;; Recommanded package.
1059 ;; Optional packages, searched for at start,
1060 ;; and their depedencies.
1063 "crisp-1.4.4" ; bsd-2
1064 "ctbllib" ; gpl3+ according to doc/chap0.txt
1067 "irredsol-1.4" ; bsd-2
1074 "tomlib-1.2.7" ; gpl2+, clarified in the git repository
1075 ; and the next release
1078 (build-system gnu-build-system)
1083 `(#:modules ((ice-9 ftw)
1085 (guix build gnu-build-system)
1088 (modify-phases %standard-phases
1089 (add-after 'build 'build-packages
1090 ;; Compile all packages that have not been deleted by the
1091 ;; code snippet above.
1093 (setenv "CONFIG_SHELL" (which "bash"))
1094 (with-directory-excursion "pkg"
1095 (invoke "../bin/BuildPackages.sh")
1097 (add-after 'build-packages 'build-doc
1098 ;; The documentation is bundled, but we create it from source.
1100 (with-directory-excursion "doc"
1101 (invoke "./make_doc"))
1104 (lambda* (#:key outputs #:allow-other-keys)
1105 (let* ((out (assoc-ref outputs "out"))
1106 (bin (string-append out "/bin"))
1107 (lib (string-append out "/lib"))
1108 (prog (string-append bin "/gap"))
1109 (prog-real (string-append bin "/.gap-real"))
1110 (share (string-append out "/share/gap"))
1111 (include (string-append out "/include/gap"))
1112 (include-hpc (string-append include "/hpc")))
1113 ;; Install only the gap binary; the gac compiler is left
1114 ;; for maybe later. "Wrap" it in a shell script that calls
1115 ;; the binary with the correct parameter.
1117 (copy-file "gap" prog-real)
1118 (call-with-output-file prog
1121 "#!~a~%exec ~a -l ~a \"$@\"~%"
1126 ;; Install the headers, which are needed by Sage. The
1127 ;; Makefile target "install-headers" was available in
1128 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1129 (mkdir-p include-hpc)
1130 (install-file "gen/config.h" include)
1131 (let ((file-name-predicate-without-stat
1133 (cut (file-name-predicate regex) <> #f))))
1134 (with-directory-excursion "src"
1136 (cut install-file <> include)
1138 (file-name-predicate-without-stat ".*\\.h$"))))
1139 (with-directory-excursion "src/hpc"
1141 (cut install-file <> include-hpc)
1143 (file-name-predicate-without-stat ".*\\.h$")))))
1144 ;; Install the library, which is needed by Sage. The
1145 ;; Makefile target "install-libgap" was available in
1146 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1147 ;; Compared to the Makefile, which used libtool, the
1148 ;; following approach of copying files and making symlinks
1149 ;; is rather pedestrian. There is hope that some later
1150 ;; version of gap reinstates and completes the install
1152 (invoke "make" "libgap.la")
1153 (install-file "libgap.la" lib)
1154 (install-file ".libs/libgap.so.0.0.0" lib)
1155 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so"))
1156 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so.0"))
1157 ;; Install a certain number of files and directories to
1158 ;; SHARE, where the wrapped shell script expects them.
1159 ;; Remove information on the build directory from sysinfo.gap.
1160 (substitute* "sysinfo.gap"
1161 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1162 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1163 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1164 (install-file "sysinfo.gap" share)
1165 (copy-recursively "grp" (string-append share "/grp"))
1166 (copy-recursively "pkg" (string-append share "/pkg"))
1167 ;; The following is not the C library libgap.so, but a
1168 ;; library of GAP code.
1169 (copy-recursively "lib" (string-append share "/lib"))
1170 ;; The gap binary looks for documentation inside SHARE.
1171 (copy-recursively "doc" (string-append share "/doc")))
1173 (home-page "https://www.gap-system.org/")
1175 "System for computational group theory")
1177 "GAP is a system for computational discrete algebra, with particular
1178 emphasis on computational group theory. It provides a programming language,
1179 a library of thousands of functions implementing algebraic algorithms
1180 written in the GAP language as well as large data libraries of algebraic
1182 ;; Some packages have different licenses (effectively forcing the
1183 ;; combined work to be licensed as gpl3+); if this is the case, this
1184 ;; is mentioned above next to their name.
1185 ;; Some packages have no license mentioned explicitly; supposedly this
1186 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1187 ;; safe side, we drop them for now.
1188 (license license:gpl2+)))
1190 (define-public givaro
1197 (url "https://github.com/linbox-team/givaro")
1198 (commit (string-append "v" version))))
1199 (file-name (git-file-name name version))
1202 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1203 (build-system gnu-build-system)
1205 `(("autoconf" ,autoconf)
1206 ("automake" ,automake)
1207 ("libtool" ,libtool)))
1209 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1212 (modify-phases %standard-phases
1213 (add-before 'bootstrap 'setenv
1214 ;; Prevent the autogen.sh script to carry out the configure
1215 ;; script, which has not yet been patched to replace /bin/sh.
1217 (setenv "NOCONFIGURE" "yes")
1219 (synopsis "Algebraic computations with exact rings and fields")
1221 "Givaro is a C++ library implementing the basic arithmetic of various
1222 algebraic objects: prime fields, extension fields, finite fields, finite
1223 rings, polynomials, algebraic numbers, arbitrary precision integers and
1224 rationals (C++ wrappers over gmp), fixed precision integers. It also
1225 provides data-structures and templated classes for the manipulation of
1226 compound objects, such as vectors, matrices and univariate polynomials.")
1227 (license license:cecill-b)
1228 (home-page "https://github.com/linbox-team/givaro")))
1230 (define-public fflas-ffpack
1232 (name "fflas-ffpack")
1237 (url "https://github.com/linbox-team/fflas-ffpack")
1239 (file-name (git-file-name name version))
1242 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1243 (build-system gnu-build-system)
1245 `(("autoconf" ,autoconf)
1246 ("automake" ,automake)
1247 ("libtool" ,libtool)
1248 ("pkg-config" ,pkg-config)))
1250 `(("openblas" ,openblas)))
1252 `(("givaro" ,givaro))) ; required according to the .pc file
1255 (list (string-append "--with-blas-libs="
1256 (assoc-ref %build-inputs "openblas")
1257 "/lib/libopenblas.so"))
1259 (modify-phases %standard-phases
1260 (add-before 'bootstrap 'setenv
1261 ;; Prevent the autogen.sh script to carry out the configure
1262 ;; script, which has not yet been patched to replace /bin/sh.
1264 (setenv "NOCONFIGURE" "yes")
1266 (synopsis "C++ library for linear algebra over finite fields")
1268 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1269 operations over a finite field.
1270 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1271 of a subset of routines of the numerical BLAS; it also supports sparse
1272 matrix-vector products.
1273 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1274 library to provide functionalities of higher level, using the kernel
1275 of a BLAS. Additionally, it provides routines specific to exact linear
1276 algebra, such as the row echelon form.")
1277 (license license:lgpl2.1+)
1278 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1280 (define-public linbox
1287 (url "https://github.com/linbox-team/linbox")
1288 (commit (string-append "v" version))))
1289 (file-name (git-file-name name version))
1292 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))))
1293 (build-system gnu-build-system)
1295 `(("autoconf" ,autoconf)
1296 ("automake" ,automake)
1297 ("libtool" ,libtool)
1298 ("pkg-config" ,pkg-config)))
1300 `(("fflas-ffpack" ,fflas-ffpack)))
1303 (modify-phases %standard-phases
1304 (add-before 'bootstrap 'setenv
1305 ;; Prevent the autogen.sh script to carry out the configure
1306 ;; script, which has not yet been patched to replace /bin/sh.
1308 (setenv "NOCONFIGURE" "yes")
1310 (synopsis "C++ library for linear algebra over exact rings")
1312 "LinBox is a C++ template library for exact linear algebra computation
1313 with dense, sparse, and structured matrices over the integers and over
1315 (license license:lgpl2.1+)
1316 (home-page "https://linbox-team.github.io/linbox/")))
1321 (version "20140914")
1325 (url "https://bitbucket.org/malb/m4ri")
1326 (commit (string-append "release-" version))))
1327 (file-name (git-file-name name version))
1330 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1331 (build-system gnu-build-system)
1333 `(("autoconf" ,autoconf)
1334 ("automake" ,automake)
1335 ("libtool" ,libtool)
1336 ("pkg-config" ,pkg-config)))
1338 `(("libpng" ,libpng)))
1339 (synopsis "Arithmetic of dense matrices over F_2")
1340 (description "M4RI is a library for fast arithmetic with dense matrices
1341 over F2. The name M4RI comes from the first implemented algorithm: The
1342 Method of the Four Russians inversion algorithm published by Gregory Bard.
1343 This algorithm in turn is named after the Method of the Four Russians
1344 multiplication algorithm.")
1345 (license license:gpl2+)
1346 (home-page "https://bitbucket.org/malb/m4ri/")))
1348 (define-public symmetrica
1353 (method url-fetch/tarbomb)
1354 (uri (let ((v (string-join (string-split version #\.) "_")))
1355 (string-append "http://www.algorithm.uni-bayreuth.de/"
1356 "en/research/SYMMETRICA/"
1357 "SYM" v "_tar.gz")))
1360 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1361 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1362 (patches (search-patches "symmetrica-bruch.patch"
1363 "symmetrica-int32.patch"
1364 "symmetrica-return_values.patch"
1365 "symmetrica-sort_sum_rename.patch"))))
1366 (build-system gnu-build-system)
1368 `(#:tests? #f ;no test
1370 (modify-phases %standard-phases
1371 (add-after 'unpack 'fix-makefile
1373 (substitute* "makefile"
1374 (("cc -c") "gcc -c -fPIC"))
1376 (add-after 'fix-makefile 'turn-off-banner
1379 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1381 (delete 'configure) ;no configure script
1382 (replace 'install ;no install target
1383 (lambda* (#:key outputs #:allow-other-keys)
1384 (let* ((out (assoc-ref outputs "out"))
1385 (lib (string-append out "/lib"))
1386 (inc (string-append out "/include/symmetrica"))
1387 (doc (string-append out "/share/doc/symmetrica-" ,version))
1388 (static "libsymmetrica.a"))
1389 ;; Build static library.
1390 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1391 (invoke "ranlib" static)
1392 ;; Install static library and headers.
1393 (for-each (lambda (f) (install-file f inc))
1394 (find-files "." "\\.h$"))
1395 (install-file "libsymmetrica.a" lib)
1396 ;; Install documentation.
1397 (for-each (lambda (f) (install-file f doc))
1398 (find-files "." "\\.doc$"))
1400 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1401 (synopsis "Combinatoric C Library")
1402 (description "Symmetrica is a library for combinatorics. It has support
1403 for the representation theory of the symmetric group and related groups,
1404 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1405 polynomials, and the representation theory of Hecke algebras of type A_n.")
1406 (license license:public-domain)))
1408 (define-public m4rie
1411 (version "20150908")
1415 (url "https://bitbucket.org/malb/m4rie")
1416 (commit (string-append "release-" version))))
1417 (file-name (git-file-name name version))
1420 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1421 (build-system gnu-build-system)
1423 `(("autoconf" ,autoconf)
1424 ("automake" ,automake)
1425 ("libtool" ,libtool)))
1428 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1429 (description "M4RI is a library for fast arithmetic with dense matrices
1430 over finite fields of characteristic 2. So it extends the functionality
1431 of M4RI from F_2 to F_{2^e}.")
1432 (license license:gpl2+)
1433 (home-page "https://bitbucket.org/malb/m4rie/")))
1435 (define-public eclib
1438 (version "20190226")
1442 (url "https://github.com/JohnCremona/eclib/")
1443 (commit (string-append "v" version))))
1444 (file-name (git-file-name name version))
1447 "1910np1xzyjzszay24xn4b81qhpsvhp5aix9vdpknplni2mq8kwb"))))
1448 (build-system gnu-build-system)
1450 `(("autoconf" ,autoconf)
1451 ("automake" ,automake)
1452 ("libtool" ,libtool)))
1456 ("pari-gp" ,pari-gp)))
1457 (synopsis "Ranks of elliptic curves and modular symbols")
1458 (description "The eclib package includes mwrank (for 2-descent on
1459 elliptic curves over Q) and modular symbol code; it has been written by
1460 John Cremona to compute his elliptic curve database.")
1461 (license license:gpl2+)
1462 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1463 "J.E.Cremona/mwrank/index.html"))))
1465 (define-public lrcalc
1472 (url "https://bitbucket.org/asbuch/lrcalc")
1473 (commit (string-append "lrcalc-" version))))
1474 (file-name (git-file-name name version))
1477 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1478 (patches (search-patches "lrcalc-includes.patch"))))
1479 (build-system gnu-build-system)
1481 `(("autoconf" ,autoconf)
1482 ("automake" ,automake)
1483 ("libtool" ,libtool)))
1486 (modify-phases %standard-phases
1487 (add-before 'build 'fix-permission
1489 (chmod "lrcalc.maple.src" #o644)
1491 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1492 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1493 program designed to compute Littlewood-Richardson coefficients. It computes
1494 single Littlewood-Richardson coefficients, products of Schur functions, or
1495 skew Schur functions. In addition it computes products in the small quantum
1496 cohomology ring of a Grassmann variety. The software package also includes
1497 a program that performs fast computation of the more general multiplicative
1498 structure constants of Schubert polynomials.")
1499 (license license:gpl2+)
1500 (home-page "http://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1509 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1510 version ".tar.bz2"))
1513 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1514 (build-system gnu-build-system)
1517 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1518 ; mentions ATLAS in particular
1523 (string-append "--with-gmp-include="
1524 (assoc-ref %build-inputs "gmp") "/include")
1525 (string-append "--with-gmp-lib="
1526 (assoc-ref %build-inputs "gmp") "/lib")
1527 "--with-cblas=-lopenblas"
1528 (string-append "--with-cblas-include="
1529 (assoc-ref %build-inputs "cblas") "/include")
1530 (string-append "--with-cblas-lib="
1531 (assoc-ref %build-inputs "cblas") "/lib"))))
1532 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1534 "Solver for systems of linear equations over the integers")
1536 "IML is a C library implementing algorithms for computing exact
1537 solutions to dense systems of linear equations over the integers.
1538 Currently, IML provides the following functionality:
1541 @item Nonsingular rational system solving:
1542 compute the unique rational solution X to the system AX=B, where A and B
1543 are integer matrices, A nonsingular.
1544 @item Compute the right nullspace or kernel of an integer matrix.
1545 @item Certified linear system solving:
1546 compute a minimal denominator solution x to a system Ax=b, where b is an
1547 integer vector and A is an integer matrix with arbitrary shape and
1551 In addition, IML provides some low level routines for a variety of mod p
1552 matrix operations: computing the row-echelon form, determinant, rank
1553 profile, and inverse of a mod p matrix. These mod p routines are not
1554 general purpose; they require that p satisfy some preconditions based on
1555 the dimension of the input matrix (usually p should be prime and should be
1556 no more than about 20 bits long).")
1557 (license license:bsd-3)))