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, 2020 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>
13 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages algebra)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages check)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages cpp)
37 #:use-module (gnu packages documentation)
38 #:use-module (gnu packages ed)
39 #:use-module (gnu packages flex)
40 #:use-module (gnu packages fltk)
41 #:use-module (gnu packages gl)
42 #:use-module (gnu packages graphviz)
43 #:use-module (gnu packages image)
44 #:use-module (gnu packages java)
45 #:use-module (gnu packages maths)
46 #:use-module (gnu packages mpi)
47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages perl)
49 #:use-module (gnu packages pkg-config)
50 #:use-module (gnu packages pulseaudio)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages python-xyz)
53 #:use-module (gnu packages readline)
54 #:use-module (gnu packages shells)
55 #:use-module (gnu packages tex)
56 #:use-module (gnu packages texinfo)
57 #:use-module (gnu packages xiph)
58 #:use-module (gnu packages xorg)
59 #:use-module (guix build-system ant)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system cmake)
62 #:use-module (guix build-system python)
63 #:use-module (guix download)
64 #:use-module (guix git-download)
65 #:use-module (guix hg-download)
66 #:use-module ((guix licenses) #:prefix license:)
67 #:use-module (guix packages)
68 #:use-module (guix utils))
78 "http://www.multiprecision.org/downloads/mpfrcx-"
82 "1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
83 (build-system gnu-build-system)
87 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
88 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
90 "Mpfrcx is a library for the arithmetic of univariate polynomials over
91 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
92 on the rounding. For the time being, only the few functions needed to
93 implement the floating point approach to complex multiplication are
94 implemented. On the other hand, these comprise asymptotically fast
95 multiplication routines such as Toom–Cook and the FFT.")
96 (license license:lgpl3+)
97 (home-page "http://www.multiprecision.org/mpfrcx/")))
106 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
110 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
111 (build-system gnu-build-system)
112 (synopsis "Arithmetic of polynomials over binary finite fields")
114 "The gf2x library provides arithmetic of polynomials over finite fields
115 of characteristic 2. It implements the multiplication, squaring and
116 greatest common divisor operations.")
117 (license license:gpl3+)
118 (home-page "https://gforge.inria.fr/projects/gf2x/")))
127 "http://www.multiprecision.org/cm/download/cm-"
131 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
132 (build-system gnu-build-system)
135 ("zlib" ,zlib))) ; Header files included from cm_common.h.
137 `(("pari-gp" ,pari-gp)))
138 (synopsis "CM constructions for elliptic curves")
140 "The CM software implements the construction of ring class fields of
141 imaginary quadratic number fields and of elliptic curves with complex
142 multiplication via floating point approximations. It consists of libraries
143 that can be called from within a C program and of executable command
145 (license license:gpl3+)
146 (home-page "http://www.multiprecision.org/cm/")))
155 (url "https://github.com/fplll/fplll.git")
157 (file-name (git-file-name name version))
160 "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg"))))
161 (build-system gnu-build-system)
163 `(("autoconf" ,autoconf)
164 ("automake" ,automake)
165 ("libtool" ,libtool)))
169 (home-page "https://github.com/fplll/fplll")
170 (synopsis "Library for LLL-reduction of euclidean lattices")
172 "fplll contains implementations of several lattice algorithms.
173 The implementation relies on floating-point orthogonalization, and LLL
174 is central to the code, hence the name.
176 It includes implementations of floating-point LLL reduction
177 algorithms, offering different speed/guarantees ratios. It contains
178 a @emph{wrapper} choosing the estimated best sequence of variants in
179 order to provide a guaranteed output as fast as possible. In the case
180 of the wrapper, the succession of variants is oblivious to the user.
182 It includes an implementation of the BKZ reduction algorithm,
183 including the BKZ-2.0 improvements (extreme enumeration
184 pruning, pre-processing of blocks, early termination). Additionally,
185 Slide reduction and self dual BKZ are supported.
187 It also includes a floating-point implementation of the
188 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
189 vector. For the same task, the GaussSieve algorithm is also available
190 in fplll. Finally, it contains a variant of the enumeration algorithm
191 that computes a lattice vector closest to a given vector belonging to
192 the real span of the lattice.")
193 (license license:lgpl2.1+)))
195 (define-public python-fpylll
197 (name "python-fpylll")
201 ;; Pypi contains and older release, so we use a tagged release from
205 (url "https://github.com/fplll/fpylll.git")
206 (commit (string-append version "dev"))))
207 (file-name (git-file-name name version))
210 "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
211 (build-system python-build-system)
216 ("pari-gp" ,pari-gp)))
218 `(("cysignals" ,python-cysignals)
219 ("cython" ,python-cython)
220 ("flake8" ,python-flake8)
221 ("numpy" ,python-numpy)
222 ("pytest" ,python-pytest)))
223 (home-page "https://github.com/fplll/fpylll")
224 (synopsis "Python interface for fplll")
225 (description "fpylll is a Python wrapper for fplll.")
226 (license license:gpl2+)))
228 (define-public pari-gp
235 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
239 "1jd65h2psrmba2dx7rkf5qidf9ka0cwbsg20pd18k45ggr30l467"))))
240 (build-system gnu-build-system)
242 `(("texlive" ,(texlive-union
243 (list texlive-amsfonts)))))
244 (inputs `(("gmp" ,gmp)
247 ("readline" ,readline)))
249 '(#:make-flags '("all")
250 #:test-target "dobench"
252 (modify-phases %standard-phases
254 (lambda* (#:key outputs #:allow-other-keys)
255 (invoke "./Configure"
256 (string-append "--prefix="
257 (assoc-ref outputs "out"))))))))
258 (synopsis "PARI/GP, a computer algebra system for number theory")
260 "PARI/GP is a widely used computer algebra system designed for fast
261 computations in number theory (factorisations, algebraic number theory,
262 elliptic curves...), but it also contains a large number of other useful
263 functions to compute with mathematical entities such as matrices,
264 polynomials, power series, algebraic numbers, etc., and a lot of
265 transcendental functions.
266 PARI is also available as a C library to allow for faster computations.")
267 (license license:gpl2+)
268 (home-page "https://pari.math.u-bordeaux.fr/")))
273 (version "0.0.11pl3")
277 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
281 "0yymbrgyjw500hqgmkj5m4nmscd7c9rs9w2c96lxgrcyab8krhrm"))))
282 (build-system gnu-build-system)
283 (native-inputs `(("perl" ,perl)))
284 (inputs `(("pari-gp" ,pari-gp)))
287 (list (string-append "--with-paricfg="
288 (assoc-ref %build-inputs "pari-gp")
289 "/lib/pari/pari.cfg"))))
290 (synopsis "PARI/GP, a computer algebra system for number theory")
292 "PARI/GP is a widely used computer algebra system designed for fast
293 computations in number theory (factorisations, algebraic number theory,
294 elliptic curves...), but it also contains a large number of other useful
295 functions to compute with mathematical entities such as matrices,
296 polynomials, power series, algebraic numbers, etc., and a lot of
297 transcendental functions.
298 PARI is also available as a C library to allow for faster computations.
300 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
301 (license license:gpl2)
302 (home-page "https://pari.math.u-bordeaux.fr/")))
313 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
316 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
325 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
329 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
330 (build-system gnu-build-system)
336 ("fplll" ,fplll-4-cmh)
337 ("pari-gp" ,pari-gp)))
338 (synopsis "Igusa class polynomial computations")
340 "The CMH software computes Igusa (genus 2) class polynomials, which
341 parameterize the CM points in the moduli space of 2-dimensional abelian
342 varieties, i.e. Jacobians of hyperelliptic curves.
343 It can also be used to compute theta constants at arbitrary
345 (license license:gpl3+)
346 (home-page "http://cmh.gforge.inria.fr/")))
355 ;; "~parisse/giac" is not used because the maintainer regularly
356 ;; overwrites the release tarball there, introducing a checksum
357 ;; mismatch every time. See
358 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
359 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
360 "~parisse/debian/dists/stable/main/source/"
361 "giac_" version ".tar.gz"))
363 (base32 "1d0h1yb7qvh9x7wwv9yrzmcp712f49w1iljkxp4y6g9pzsmg1mmv"))))
364 (build-system gnu-build-system)
366 `(#:modules ((ice-9 ftw)
368 (guix build gnu-build-system))
370 (modify-phases %standard-phases
371 (add-after 'unpack 'patch-bin-cp
372 ;; Some Makefiles contain hard-coded "/bin/cp".
374 (substitute* (find-files "doc" "^Makefile")
375 (("/bin/cp") (which "cp")))
377 (add-after 'unpack 'disable-failing-test
378 ;; FIXME: Test failing. Not sure why.
380 (substitute* "check/Makefile.in"
383 (add-after 'install 'fix-doc
384 (lambda* (#:key outputs #:allow-other-keys)
385 (let ((out (assoc-ref outputs "out")))
386 ;; Most French documentation has a non-commercial
387 ;; license, so we need to remove it.
388 (with-directory-excursion (string-append out "/share/giac/doc/fr")
389 (for-each delete-file-recursively
390 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
392 ;; Remove duplicate documentation in
393 ;; "%out/share/doc/giac/", where Xcas does not expect
395 (delete-file-recursively (string-append out "/share/doc/giac"))
397 (add-after 'install 'remove-unnecessary-executable
398 (lambda* (#:key outputs #:allow-other-keys)
399 (let ((out (assoc-ref outputs "out")))
400 (delete-file (string-append out "/bin/xcasnew"))
403 ;;; TODO: Add libnauty.
410 ("libjpeg" ,libjpeg-turbo)
412 ("libsamplerate" ,libsamplerate)
414 ("libxinerama" ,libxinerama)
427 ("readline" ,readline)
428 ("texlive" ,texlive-tiny)))
429 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
430 (synopsis "Computer algebra system")
432 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
433 maple, mupad and the TI89. It is available as a standalone program (graphic
434 or text interfaces) or as a C++ library.")
435 (license license:gpl3+)))
444 "http://flintlib.org/flint-"
447 "11syazv1a8rrnac3wj3hnyhhflpqcmq02q8pqk2m6g2k6h0gxwfb"))
448 (patches (search-patches "flint-ldconfig.patch"))))
449 (build-system gnu-build-system)
452 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
454 `(#:parallel-tests? #f ; seems to be necessary on arm
456 (modify-phases %standard-phases
458 (lambda* (#:key inputs outputs #:allow-other-keys)
459 (let ((out (assoc-ref outputs "out"))
460 (gmp (assoc-ref inputs "gmp"))
461 (mpfr (assoc-ref inputs "mpfr")))
462 ;; do not pass "--enable-fast-install", which makes the
463 ;; homebrew configure process fail
464 (invoke "./configure"
465 (string-append "--prefix=" out)
466 (string-append "--with-gmp=" gmp)
467 (string-append "--with-mpfr=" mpfr))
469 (synopsis "Fast library for number theory")
471 "FLINT is a C library for number theory. It supports arithmetic
472 with numbers, polynomials, power series and matrices over many base
473 rings, including multiprecision integers and rationals, integers
474 modulo n, p-adic numbers, finite fields (prime and non-prime order)
475 and real and complex numbers (via the Arb extension library).
477 Operations that can be performed include conversions, arithmetic,
478 GCDs, factoring, solving linear systems, and evaluating special
479 functions. In addition, FLINT provides various low-level routines for
481 (license license:gpl2+)
482 (home-page "http://flintlib.org/")))
491 (url "https://github.com/fredrik-johansson/arb.git")
493 (file-name (git-file-name name version))
496 "05lpy3hkl5f8ik19aw40cqydrb932xaf2n8hbq9ib5dnk7f010p1"))))
497 (build-system gnu-build-system)
499 `(("flint" ,flint))) ; flint.h is included by arf.h
505 (modify-phases %standard-phases
507 (lambda* (#:key inputs outputs #:allow-other-keys)
508 (let ((out (assoc-ref outputs "out"))
509 (flint (assoc-ref inputs "flint"))
510 (gmp (assoc-ref inputs "gmp"))
511 (mpfr (assoc-ref inputs "mpfr")))
512 ;; Do not pass "--enable-fast-install", which makes the
513 ;; homebrew configure process fail.
514 (invoke "./configure"
515 (string-append "--prefix=" out)
516 (string-append "--with-flint=" flint)
517 (string-append "--with-gmp=" gmp)
518 (string-append "--with-mpfr=" mpfr))))))))
519 (synopsis "Arbitrary precision floating-point ball arithmetic")
521 "Arb is a C library for arbitrary-precision floating-point ball
522 arithmetic. It supports efficient high-precision computation with
523 polynomials, power series, matrices and special functions over the
524 real and complex numbers, with automatic, rigorous error control.")
525 (license license:lgpl2.1+)
526 (home-page "http://arblib.org")))
528 (define-public python-flint
530 (name "python-flint")
535 (url "https://github.com/fredrik-johansson/python-flint.git")
537 (file-name (git-file-name name version))
540 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
541 (patches (search-patches "python-flint-includes.patch"))))
542 (build-system python-build-system)
544 `(("python-cython" ,python-cython)))
546 `(("python-numpy" ,python-numpy)))
550 (synopsis "Python module wrapping ARB and FLINT")
552 "Python-flint is a Python extension module wrapping FLINT
553 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
554 arithmetic). It supports integers, rationals, modular integers,
555 real and complex ball arithmetic, polynomials and matrices over all
556 these types and other mathematical functions.")
557 (license license:expat)
558 (home-page "http://fredrikj.net/python-flint/")))
566 (uri (string-append "https://shoup.net/ntl/ntl-"
570 "1lisp3064rch3jaa2wrhy1s9kll7i3ka3d0y6lj6l3l4ckfcrhdp"))
571 (modules '((guix build utils)))
574 (delete-file-recursively "src/libtool-origin")
576 (build-system gnu-build-system)
578 `(("libtool" ,libtool)
579 ("perl" ,perl))) ; for configuration
585 (modify-phases %standard-phases
587 (lambda* (#:key inputs outputs #:allow-other-keys)
589 (invoke "./configure"
590 (string-append "PREFIX=" (assoc-ref outputs "out"))
591 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
592 ;; set the library prefixes explicitly so that they get
593 ;; embedded in the .la file
594 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
595 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
596 ;; Do not build especially for the build machine.
600 (synopsis "C++ library for number theory")
602 "NTL is a C++ library providing data structures and algorithms
603 for manipulating signed, arbitrary length integers, and for vectors,
604 matrices, and polynomials over the integers and over finite fields.")
605 (license license:gpl2+)
606 (home-page "https://shoup.net/ntl/")))
608 (define-public singular
616 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
620 (string-trim-right version #\p
621 0 (1- (string-length version)))
623 "/singular-" version ".tar.gz"))
625 "0kvd55353fiqyq1msmi0kka66n5h0aqs7m3km60r01b1w2f8085m"))))
626 (build-system gnu-build-system)
628 `(("doxygen" ,doxygen)
629 ("graphviz" ,graphviz)
638 ("readline" ,readline)))
641 (list (string-append "--with-ntl="
642 (assoc-ref %build-inputs "ntl")))))
643 (synopsis "Computer algebra system for polynomial computations")
645 "Singular is a computer algebra system for polynomial computations,
646 with special emphasis on commutative and non-commutative algebra, algebraic
647 geometry and singularity theory.")
648 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
649 ;; libraries with which it links are licensed under lgpl3+, so the
650 ;; combined work becomes gpl3. See COPYING in the source code.
651 (license license:gpl3)
652 (home-page "http://www.singular.uni-kl.de/index.php")))
654 (define-public gmp-ecm
660 ;; Use the ‘Latest version’ link for a stable URI across releases.
661 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
662 "latestfile/160/ecm-" version ".tar.gz"))
664 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
665 (build-system gnu-build-system)
669 `(#:configure-flags '("--enable-shared"
670 ;; Disable specific assembly routines, which depend
671 ;; on the subarchitecture of the build machine,
672 ;; and use gmp instead.
673 "--disable-asm-redc")))
674 (synopsis "Integer factorization library using the elliptic curve method")
676 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
677 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
679 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
680 ;; so the combined work is under gpl3+.
681 (license license:gpl3+)
682 (home-page "http://ecm.gforge.inria.fr/")))
690 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
693 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
694 (patches (search-patches "bc-fix-cross-compilation.patch"))))
695 (build-system gnu-build-system)
697 `(("automake" ,automake)
698 ("autoconf" ,autoconf)
701 ("texinfo" ,texinfo)))
704 (list "--with-readline")
706 (modify-phases %standard-phases
707 (add-after 'unpack 'autogen
709 (invoke "autoreconf" "-vif"))))))
710 (home-page "https://www.gnu.org/software/bc/")
711 (synopsis "Arbitrary precision numeric processing language")
713 "bc is an arbitrary precision numeric processing language. It includes
714 an interactive environment for evaluating mathematical statements. Its
715 syntax is similar to that of C, so basic usage is familiar. It also includes
716 \"dc\", a reverse-polish calculator.")
717 (license license:gpl2+)))
719 ;; The original kiss-fft does not have a complete build system and does not
720 ;; build any shared libraries. This is a fork used by Extempore.
721 (define-public kiss-fft-for-extempore
723 (name "kiss-fft-for-extempore")
728 (url "https://github.com/extemporelang/kiss_fft.git")
730 (file-name (git-file-name name version))
733 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
734 (build-system cmake-build-system)
735 (arguments `(#:tests? #f)) ; no tests included
736 ;; Extempore refuses to build on architectures other than x86_64
737 (supported-systems '("x86_64-linux"))
738 (home-page "https://github.com/extemporelang/kiss_fft")
739 (synopsis "Mixed-radix Fast Fourier Transform")
741 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
742 that can use fixed or floating data types and can easily be incorporated into
744 (license license:bsd-3)))
752 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
756 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
757 (build-system gnu-build-system)
760 '("--enable-shared" "--enable-openmp" "--enable-threads"
761 ,@(let ((system (or (%current-target-system) (%current-system))))
762 ;; Enable SIMD extensions for codelets. See details at:
763 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
765 ((string-prefix? "x86_64" system)
766 '("--enable-sse2" "--enable-avx" "--enable-avx2"
767 "--enable-avx512" "--enable-avx-128-fma"))
768 ((string-prefix? "i686" system)
770 ((string-prefix? "aarch64" system)
771 ;; Note that fftw supports NEON on 32-bit ARM only when
772 ;; compiled for single-precision.
776 ;; By default '-mtune=native' is used. However, that may cause the
777 ;; use of ISA extensions (e.g. AVX) that are not necessarily
778 ;; available on the user's machine when that package is built on a
779 ;; different machine.
780 "ax_cv_c_flags__mtune_native=no")))
781 (native-inputs `(("perl" ,perl)))
782 (home-page "http://fftw.org")
783 (synopsis "Computing the discrete Fourier transform")
785 "FFTW is a C subroutine library for computing the discrete Fourier
786 transform (DFT) in one or more dimensions, of arbitrary input size, and of
787 both real and complex data (as well as of even/odd data---i.e. the discrete
788 cosine/ sine transforms or DCT/DST).")
789 (license license:gpl2+)))
792 (package (inherit fftw)
795 (substitute-keyword-arguments (package-arguments fftw)
796 ((#:configure-flags fftw-configure-flags)
797 `(cons* "--enable-single"
798 ,@(if (string-prefix? "arm" (or (%current-target-system)
800 ;; fftw supports NEON on 32-bit ARM only when compiled
801 ;; for single-precision, so add it here.
804 ,fftw-configure-flags))))
806 (string-append (package-description fftw)
807 " Single-precision version."))))
809 (define-public fftw-openmpi
810 (package (inherit fftw)
811 (name "fftw-openmpi")
813 `(("openmpi" ,openmpi)
814 ,@(package-inputs fftw)))
816 (substitute-keyword-arguments (package-arguments fftw)
817 ((#:configure-flags cf)
818 `(cons "--enable-mpi" ,cf))
819 ((#:phases phases '%standard-phases)
820 `(modify-phases ,phases
821 (add-before 'check 'mpi-setup
824 (string-append (package-description fftw)
825 " With OpenMPI parallelism support."))))
827 (define-public java-la4j
834 (url "https://github.com/vkostyukov/la4j.git")
836 (file-name (string-append name "-" version "-checkout"))
839 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
840 (build-system ant-build-system)
842 `(#:jar-name "la4j.jar"
844 #:test-exclude (list "**/Abstract*.java"
846 "**/DenseMatrixTest.java"
847 "**/SparseMatrixTest.java"
849 "**/SparseVectorTest.java"
850 "**/DenseVectorTest.java")))
852 `(("java-junit" ,java-junit)
853 ("java-hamcrest-core" ,java-hamcrest-core)))
854 (home-page "http://la4j.org/")
855 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
856 (description "The la4j library is a Java library that provides Linear
857 Algebra primitives (matrices and vectors) and algorithms. The key features of
858 the la4j library are:
861 @item No dependencies and tiny size
862 @item Fluent object-oriented/functional API
863 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
864 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
865 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
866 @item MatrixMarket/CSV IO formats support for matrices and vectors
868 (license license:asl2.0)))
870 (define-public java-jlargearrays
872 (name "java-jlargearrays")
876 (uri (string-append "https://repo1.maven.org/maven2/"
877 "pl/edu/icm/JLargeArrays/"
878 version "/JLargeArrays-" version
880 (file-name (string-append name "-" version ".jar"))
883 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
884 (build-system ant-build-system)
886 `(#:jar-name "jlargearrays.jar"
887 #:tests? #f ; tests are not included in the release archive
890 `(("java-commons-math3" ,java-commons-math3)))
891 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
892 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
893 (description "JLargeArrays is a Java library of one-dimensional arrays
894 that can store up to 263 elements.")
895 (license license:bsd-2)))
897 (define-public java-jtransforms
899 (name "java-jtransforms")
903 (uri (string-append "https://repo1.maven.org/maven2/"
904 "com/github/wendykierp/JTransforms/"
905 version "/JTransforms-" version "-sources.jar"))
908 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
909 (build-system ant-build-system)
911 `(#:jar-name "jtransforms.jar"
912 #:tests? #f ; tests are not included in the release archive
915 `(("java-commons-math3" ,java-commons-math3)
916 ("java-jlargearrays" ,java-jlargearrays)))
917 (home-page "https://github.com/wendykierp/JTransforms")
918 (synopsis "Multithreaded FFT library written in pure Java")
919 (description "JTransforms is a multithreaded FFT library written in pure
920 Java. Currently, four types of transforms are available: @dfn{Discrete
921 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
922 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
923 (license license:bsd-2)))
931 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
935 "1km3fyfzyqfdvmnl79drps3fjwnz3zbh0c7l34mfbqyvvs8cy4wz"))
936 (file-name (string-append name "-" version ".tar.bz2"))
937 (patches (search-patches "eigen-stabilise-sparseqr-test.patch"))
938 (modules '((guix build utils)))
940 ;; There are 3 test failures in the "unsupported" directory,
941 ;; but maintainers say it's a known issue and it's unsupported
942 ;; anyway, so just skip them.
944 (substitute* "unsupported/CMakeLists.txt"
945 (("add_subdirectory\\(test.*")
946 "# Do not build the tests for unsupported features.\n"))
948 (build-system cmake-build-system)
950 '(;; Turn off debugging symbols to save space.
951 #:build-type "Release"
953 #:phases (modify-phases %standard-phases
956 (let* ((cores (parallel-job-count))
957 (dash-j (format #f "-j~a" cores)))
958 (setenv "EIGEN_SEED" "1") ;for reproducibility
959 ;; First build the tests, in parallel. See
960 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
961 (invoke "make" "buildtests" dash-j)
963 ;; Then run 'CTest' with -V so we get more
964 ;; details upon failure.
965 (invoke "ctest" "-V" dash-j)))))))
966 (home-page "https://eigen.tuxfamily.org")
967 (synopsis "C++ template library for linear algebra")
969 "Eigen is a C++ template library for linear algebra: matrices, vectors,
970 numerical solvers, and related algorithms. It provides an elegant API based
971 on \"expression templates\". It is versatile: it supports all matrix sizes,
972 all standard numeric types, various matrix decompositions and geometry
973 features, and more.")
975 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
976 ;; See 'COPYING.README' for details.
977 (license license:mpl2.0)))
979 (define-public eigen-for-tensorflow
980 (let ((changeset "fd6845384b86")
982 (package (inherit eigen)
983 (name "eigen-for-tensorflow")
984 (version (string-append "3.3.5-" revision "." changeset))
988 (url "https://bitbucket.org/eigen/eigen")
989 (changeset changeset)))
992 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
993 (file-name (string-append name "-" version "-checkout"))
994 (modules '((guix build utils)))
996 ;; There are 3 test failures in the "unsupported" directory,
997 ;; but maintainers say it's a known issue and it's unsupported
998 ;; anyway, so just skip them.
1000 (substitute* "unsupported/CMakeLists.txt"
1001 (("add_subdirectory\\(test.*")
1002 "# Do not build the tests for unsupported features.\n"))
1005 (define-public xtensor
1012 (url "https://github.com/QuantStack/xtensor.git")
1016 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1017 (file-name (git-file-name name version))))
1018 (build-system cmake-build-system)
1020 `(("googletest" ,googletest)
1024 '("-DBUILD_TESTS=ON")
1025 #:test-target "xtest"))
1026 (home-page "https://quantstack.net/xtensor")
1027 (synopsis "C++ tensors with broadcasting and lazy computing")
1028 (description "xtensor is a C++ library meant for numerical analysis with
1029 multi-dimensional array expressions.
1033 @item an extensible expression system enabling lazy broadcasting.
1034 @item an API following the idioms of the C++ standard library.
1035 @item tools to manipulate array expressions and build upon xtensor.
1037 (license license:bsd-3)))
1046 (uri (string-append "https://www.gap-system.org/pub/gap/gap-"
1047 (version-major+minor version)
1052 (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
1053 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1056 ;; Delete the external gmp and zlib libraries
1057 ;; and a subdirectory not needed for our build.
1058 (for-each delete-file-recursively
1059 '("extern" "hpcgap"))
1060 ;; Delete a failing test.
1061 ;; FIXME: This might be fixed in the next release, see
1062 ;; https://github.com/gap-system/gap/issues/3292
1063 (delete-file "tst/testinstall/dir.tst")
1064 ;; Delete all packages except for a fixed list.
1065 (with-directory-excursion "pkg"
1066 (for-each delete-file-recursively
1067 (lset-difference string=? (scandir ".")
1069 ;; Necessary packages.
1072 "SmallGrp-1.3" ; artistic2.0
1073 "transgrp" ; artistic2.0 for data,
1074 ; gpl2 or gpl3 for code
1075 ;; Recommanded package.
1077 ;; Optional packages, searched for at start,
1078 ;; and their depedencies.
1081 "crisp-1.4.4" ; bsd-2
1082 "ctbllib" ; gpl3+ according to doc/chap0.txt
1085 "irredsol-1.4" ; bsd-2
1092 "tomlib-1.2.7" ; gpl2+, clarified in the git repository
1093 ; and the next release
1096 (build-system gnu-build-system)
1101 `(#:modules ((ice-9 ftw)
1103 (guix build gnu-build-system)
1106 (modify-phases %standard-phases
1107 (add-after 'build 'build-packages
1108 ;; Compile all packages that have not been deleted by the
1109 ;; code snippet above.
1111 (setenv "CONFIG_SHELL" (which "bash"))
1112 (with-directory-excursion "pkg"
1113 (invoke "../bin/BuildPackages.sh")
1115 (add-after 'build-packages 'build-doc
1116 ;; The documentation is bundled, but we create it from source.
1118 (with-directory-excursion "doc"
1119 (invoke "./make_doc"))
1122 (lambda* (#:key outputs #:allow-other-keys)
1123 (let* ((out (assoc-ref outputs "out"))
1124 (bin (string-append out "/bin"))
1125 (lib (string-append out "/lib"))
1126 (prog (string-append bin "/gap"))
1127 (prog-real (string-append bin "/.gap-real"))
1128 (share (string-append out "/share/gap"))
1129 (include (string-append out "/include/gap"))
1130 (include-hpc (string-append include "/hpc")))
1131 ;; Install only the gap binary; the gac compiler is left
1132 ;; for maybe later. "Wrap" it in a shell script that calls
1133 ;; the binary with the correct parameter.
1135 (copy-file "gap" prog-real)
1136 (call-with-output-file prog
1139 "#!~a~%exec ~a -l ~a \"$@\"~%"
1144 ;; Install the headers, which are needed by Sage. The
1145 ;; Makefile target "install-headers" was available in
1146 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1147 (mkdir-p include-hpc)
1148 (install-file "gen/config.h" include)
1149 (let ((file-name-predicate-without-stat
1151 (cut (file-name-predicate regex) <> #f))))
1152 (with-directory-excursion "src"
1154 (cut install-file <> include)
1156 (file-name-predicate-without-stat ".*\\.h$"))))
1157 (with-directory-excursion "src/hpc"
1159 (cut install-file <> include-hpc)
1161 (file-name-predicate-without-stat ".*\\.h$")))))
1162 ;; Install the library, which is needed by Sage. The
1163 ;; Makefile target "install-libgap" was available in
1164 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1165 ;; Compared to the Makefile, which used libtool, the
1166 ;; following approach of copying files and making symlinks
1167 ;; is rather pedestrian. There is hope that some later
1168 ;; version of gap reinstates and completes the install
1170 (invoke "make" "libgap.la")
1171 (install-file "libgap.la" lib)
1172 (install-file ".libs/libgap.so.0.0.0" lib)
1173 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so"))
1174 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so.0"))
1175 ;; Install a certain number of files and directories to
1176 ;; SHARE, where the wrapped shell script expects them.
1177 ;; Remove information on the build directory from sysinfo.gap.
1178 (substitute* "sysinfo.gap"
1179 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1180 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1181 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1182 (install-file "sysinfo.gap" share)
1183 (copy-recursively "grp" (string-append share "/grp"))
1184 (copy-recursively "pkg" (string-append share "/pkg"))
1185 ;; The following is not the C library libgap.so, but a
1186 ;; library of GAP code.
1187 (copy-recursively "lib" (string-append share "/lib"))
1188 ;; The gap binary looks for documentation inside SHARE.
1189 (copy-recursively "doc" (string-append share "/doc")))
1191 (home-page "https://www.gap-system.org/")
1193 "System for computational group theory")
1195 "GAP is a system for computational discrete algebra, with particular
1196 emphasis on computational group theory. It provides a programming language,
1197 a library of thousands of functions implementing algebraic algorithms
1198 written in the GAP language as well as large data libraries of algebraic
1200 ;; Some packages have different licenses (effectively forcing the
1201 ;; combined work to be licensed as gpl3+); if this is the case, this
1202 ;; is mentioned above next to their name.
1203 ;; Some packages have no license mentioned explicitly; supposedly this
1204 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1205 ;; safe side, we drop them for now.
1206 (license license:gpl2+)))
1208 (define-public givaro
1215 (url "https://github.com/linbox-team/givaro")
1216 (commit (string-append "v" version))))
1217 (file-name (git-file-name name version))
1220 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1221 (build-system gnu-build-system)
1223 `(("autoconf" ,autoconf)
1224 ("automake" ,automake)
1225 ("libtool" ,libtool)))
1227 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1228 (synopsis "Algebraic computations with exact rings and fields")
1230 "Givaro is a C++ library implementing the basic arithmetic of various
1231 algebraic objects: prime fields, extension fields, finite fields, finite
1232 rings, polynomials, algebraic numbers, arbitrary precision integers and
1233 rationals (C++ wrappers over gmp), fixed precision integers. It also
1234 provides data-structures and templated classes for the manipulation of
1235 compound objects, such as vectors, matrices and univariate polynomials.")
1236 (license license:cecill-b)
1237 (home-page "https://github.com/linbox-team/givaro")))
1239 (define-public fflas-ffpack
1241 (name "fflas-ffpack")
1246 (url "https://github.com/linbox-team/fflas-ffpack")
1248 (file-name (git-file-name name version))
1251 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1252 (build-system gnu-build-system)
1254 `(("autoconf" ,autoconf)
1255 ("automake" ,automake)
1256 ("libtool" ,libtool)
1257 ("pkg-config" ,pkg-config)))
1259 `(("openblas" ,openblas)))
1261 `(("givaro" ,givaro))) ; required according to the .pc file
1264 (list (string-append "--with-blas-libs="
1265 (assoc-ref %build-inputs "openblas")
1266 "/lib/libopenblas.so"))))
1267 (synopsis "C++ library for linear algebra over finite fields")
1269 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1270 operations over a finite field.
1271 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1272 of a subset of routines of the numerical BLAS; it also supports sparse
1273 matrix-vector products.
1274 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1275 library to provide functionalities of higher level, using the kernel
1276 of a BLAS. Additionally, it provides routines specific to exact linear
1277 algebra, such as the row echelon form.")
1278 (license license:lgpl2.1+)
1279 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1281 (define-public linbox
1288 (url "https://github.com/linbox-team/linbox")
1289 (commit (string-append "v" version))))
1290 (file-name (git-file-name name version))
1293 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))))
1294 (build-system gnu-build-system)
1296 `(("autoconf" ,autoconf)
1297 ("automake" ,automake)
1298 ("libtool" ,libtool)
1299 ("pkg-config" ,pkg-config)))
1301 `(("fflas-ffpack" ,fflas-ffpack)))
1302 (synopsis "C++ library for linear algebra over exact rings")
1304 "LinBox is a C++ template library for exact linear algebra computation
1305 with dense, sparse, and structured matrices over the integers and over
1307 (license license:lgpl2.1+)
1308 (home-page "https://linbox-team.github.io/linbox/")))
1313 (version "20140914")
1317 (url "https://bitbucket.org/malb/m4ri")
1318 (commit (string-append "release-" version))))
1319 (file-name (git-file-name name version))
1322 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1323 (build-system gnu-build-system)
1325 `(("autoconf" ,autoconf)
1326 ("automake" ,automake)
1327 ("libtool" ,libtool)
1328 ("pkg-config" ,pkg-config)))
1330 `(("libpng" ,libpng)))
1331 (synopsis "Arithmetic of dense matrices over F_2")
1332 (description "M4RI is a library for fast arithmetic with dense matrices
1333 over F2. The name M4RI comes from the first implemented algorithm: The
1334 Method of the Four Russians inversion algorithm published by Gregory Bard.
1335 This algorithm in turn is named after the Method of the Four Russians
1336 multiplication algorithm.")
1337 (license license:gpl2+)
1338 (home-page "https://bitbucket.org/malb/m4ri/")))
1340 (define-public symmetrica
1345 (method url-fetch/tarbomb)
1346 (uri (let ((v (string-join (string-split version #\.) "_")))
1347 (string-append "http://www.algorithm.uni-bayreuth.de/"
1348 "en/research/SYMMETRICA/"
1349 "SYM" v "_tar.gz")))
1352 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1353 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1354 (patches (search-patches "symmetrica-bruch.patch"
1355 "symmetrica-int32.patch"
1356 "symmetrica-return_values.patch"
1357 "symmetrica-sort_sum_rename.patch"))))
1358 (build-system gnu-build-system)
1360 `(#:tests? #f ;no test
1362 (modify-phases %standard-phases
1363 (add-after 'unpack 'fix-makefile
1365 (substitute* "makefile"
1366 (("cc -c") "gcc -c -fPIC"))
1368 (add-after 'fix-makefile 'turn-off-banner
1371 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1373 (delete 'configure) ;no configure script
1374 (replace 'install ;no install target
1375 (lambda* (#:key outputs #:allow-other-keys)
1376 (let* ((out (assoc-ref outputs "out"))
1377 (lib (string-append out "/lib"))
1378 (inc (string-append out "/include/symmetrica"))
1379 (doc (string-append out "/share/doc/symmetrica-" ,version))
1380 (static "libsymmetrica.a"))
1381 ;; Build static library.
1382 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1383 (invoke "ranlib" static)
1384 ;; Install static library and headers.
1385 (for-each (lambda (f) (install-file f inc))
1386 (find-files "." "\\.h$"))
1387 (install-file "libsymmetrica.a" lib)
1388 ;; Install documentation.
1389 (for-each (lambda (f) (install-file f doc))
1390 (find-files "." "\\.doc$"))
1392 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1393 (synopsis "Combinatoric C Library")
1394 (description "Symmetrica is a library for combinatorics. It has support
1395 for the representation theory of the symmetric group and related groups,
1396 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1397 polynomials, and the representation theory of Hecke algebras of type A_n.")
1398 (license license:public-domain)))
1400 (define-public m4rie
1403 (version "20150908")
1407 (url "https://bitbucket.org/malb/m4rie")
1408 (commit (string-append "release-" version))))
1409 (file-name (git-file-name name version))
1412 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1413 (build-system gnu-build-system)
1415 `(("autoconf" ,autoconf)
1416 ("automake" ,automake)
1417 ("libtool" ,libtool)))
1420 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1421 (description "M4RI is a library for fast arithmetic with dense matrices
1422 over finite fields of characteristic 2. So it extends the functionality
1423 of M4RI from F_2 to F_{2^e}.")
1424 (license license:gpl2+)
1425 (home-page "https://bitbucket.org/malb/m4rie/")))
1427 (define-public eclib
1430 (version "20190909")
1434 (url "https://github.com/JohnCremona/eclib/")
1435 (commit (string-append "v" version))))
1436 (file-name (git-file-name name version))
1439 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1440 (build-system gnu-build-system)
1442 `(("autoconf" ,autoconf)
1443 ("automake" ,automake)
1444 ("libtool" ,libtool)))
1447 ("pari-gp" ,pari-gp)))
1448 (synopsis "Ranks of elliptic curves and modular symbols")
1449 (description "The eclib package includes mwrank (for 2-descent on
1450 elliptic curves over Q) and modular symbol code; it has been written by
1451 John Cremona to compute his elliptic curve database.")
1452 (license license:gpl2+)
1453 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1454 "J.E.Cremona/mwrank/index.html"))))
1456 (define-public lrcalc
1463 (url "https://bitbucket.org/asbuch/lrcalc")
1464 (commit (string-append "lrcalc-" version))))
1465 (file-name (git-file-name name version))
1468 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1469 (patches (search-patches "lrcalc-includes.patch"))))
1470 (build-system gnu-build-system)
1472 `(("autoconf" ,autoconf)
1473 ("automake" ,automake)
1474 ("libtool" ,libtool)))
1477 (modify-phases %standard-phases
1478 (add-before 'build 'fix-permission
1480 (chmod "lrcalc.maple.src" #o644)
1482 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1483 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1484 program designed to compute Littlewood-Richardson coefficients. It computes
1485 single Littlewood-Richardson coefficients, products of Schur functions, or
1486 skew Schur functions. In addition it computes products in the small quantum
1487 cohomology ring of a Grassmann variety. The software package also includes
1488 a program that performs fast computation of the more general multiplicative
1489 structure constants of Schubert polynomials.")
1490 (license license:gpl2+)
1491 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1500 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1501 version ".tar.bz2"))
1504 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1505 (build-system gnu-build-system)
1508 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1509 ; mentions ATLAS in particular
1514 (string-append "--with-gmp-include="
1515 (assoc-ref %build-inputs "gmp") "/include")
1516 (string-append "--with-gmp-lib="
1517 (assoc-ref %build-inputs "gmp") "/lib")
1518 "--with-cblas=-lopenblas"
1519 (string-append "--with-cblas-include="
1520 (assoc-ref %build-inputs "cblas") "/include")
1521 (string-append "--with-cblas-lib="
1522 (assoc-ref %build-inputs "cblas") "/lib"))))
1523 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1525 "Solver for systems of linear equations over the integers")
1527 "IML is a C library implementing algorithms for computing exact
1528 solutions to dense systems of linear equations over the integers.
1529 Currently, IML provides the following functionality:
1532 @item Nonsingular rational system solving:
1533 compute the unique rational solution X to the system AX=B, where A and B
1534 are integer matrices, A nonsingular.
1535 @item Compute the right nullspace or kernel of an integer matrix.
1536 @item Certified linear system solving:
1537 compute a minimal denominator solution x to a system Ax=b, where b is an
1538 integer vector and A is an integer matrix with arbitrary shape and
1542 In addition, IML provides some low level routines for a variety of mod p
1543 matrix operations: computing the row-echelon form, determinant, rank
1544 profile, and inverse of a mod p matrix. These mod p routines are not
1545 general purpose; they require that p satisfy some preconditions based on
1546 the dimension of the input matrix (usually p should be prime and should be
1547 no more than about 20 bits long).")
1548 (license license:bsd-3)))