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, 2020 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>
14 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
15 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages algebra)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages bison)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages cpp)
39 #:use-module (gnu packages documentation)
40 #:use-module (gnu packages ed)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages fltk)
43 #:use-module (gnu packages gl)
44 #:use-module (gnu packages graphviz)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages java)
47 #:use-module (gnu packages llvm)
48 #:use-module (gnu packages maths)
49 #:use-module (gnu packages mpi)
50 #:use-module (gnu packages multiprecision)
51 #:use-module (gnu packages ocaml)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages pulseaudio)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-xyz)
57 #:use-module (gnu packages readline)
58 #:use-module (gnu packages shells)
59 #:use-module (gnu packages tex)
60 #:use-module (gnu packages texinfo)
61 #:use-module (gnu packages xiph)
62 #:use-module (gnu packages xorg)
63 #:use-module (guix build-system ant)
64 #:use-module (guix build-system gnu)
65 #:use-module (guix build-system cmake)
66 #:use-module (guix build-system python)
67 #:use-module (guix download)
68 #:use-module (guix git-download)
69 #:use-module (guix hg-download)
70 #:use-module ((guix licenses) #:prefix license:)
71 #:use-module (guix packages)
72 #:use-module (guix utils))
82 "http://www.multiprecision.org/downloads/mpfrcx-"
86 "0gz5rma9al2jrifpknqkcnd9dkf8l05jcxy3s4ghwhd4y3h5dwia"))))
87 (build-system gnu-build-system)
91 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
92 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
94 "Mpfrcx is a library for the arithmetic of univariate polynomials over
95 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
96 on the rounding. For the time being, only the few functions needed to
97 implement the floating point approach to complex multiplication are
98 implemented. On the other hand, these comprise asymptotically fast
99 multiplication routines such as Toom–Cook and the FFT.")
100 (license license:lgpl3+)
101 (home-page "http://www.multiprecision.org/mpfrcx/")))
110 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
114 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
115 (build-system gnu-build-system)
116 (synopsis "Arithmetic of polynomials over binary finite fields")
118 "The gf2x library provides arithmetic of polynomials over finite fields
119 of characteristic 2. It implements the multiplication, squaring and
120 greatest common divisor operations.")
121 (license license:gpl3+)
122 (home-page "https://gforge.inria.fr/projects/gf2x/")))
131 "http://www.multiprecision.org/downloads/cm-"
135 "0qq6b1kwb1byj8ws33ya5awq0ilkpm32037pi1l4cf2737fg9m42"))))
136 (build-system gnu-build-system)
139 ("zlib" ,zlib))) ; Header files included from cm_common.h.
141 `(("pari-gp" ,pari-gp)))
142 (synopsis "CM constructions for elliptic curves")
144 "The CM software implements the construction of ring class fields of
145 imaginary quadratic number fields and of elliptic curves with complex
146 multiplication via floating point approximations. It consists of libraries
147 that can be called from within a C program and of executable command
149 (license license:gpl3+)
150 (home-page "http://www.multiprecision.org/cm/")))
159 (url "https://github.com/fplll/fplll")
161 (file-name (git-file-name name version))
164 "06nyfidagp8pc2kfcw88ldgb2b1xm0a8z31n0sln7j72ihlmd8zj"))
165 (patches (search-patches "fplll-std-fenv.patch"))))
166 (build-system gnu-build-system)
168 `(("autoconf" ,autoconf)
169 ("automake" ,automake)
171 ("pkg-config" ,pkg-config)))
172 (propagated-inputs ; header files pulled in by fplll/defs.h
175 (home-page "https://github.com/fplll/fplll")
176 (synopsis "Library for LLL-reduction of euclidean lattices")
178 "fplll contains implementations of several lattice algorithms.
179 The implementation relies on floating-point orthogonalization, and LLL
180 is central to the code, hence the name.
182 It includes implementations of floating-point LLL reduction
183 algorithms, offering different speed/guarantees ratios. It contains
184 a @emph{wrapper} choosing the estimated best sequence of variants in
185 order to provide a guaranteed output as fast as possible. In the case
186 of the wrapper, the succession of variants is oblivious to the user.
188 It includes an implementation of the BKZ reduction algorithm,
189 including the BKZ-2.0 improvements (extreme enumeration
190 pruning, pre-processing of blocks, early termination). Additionally,
191 Slide reduction and self dual BKZ are supported.
193 It also includes a floating-point implementation of the
194 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
195 vector. For the same task, the GaussSieve algorithm is also available
196 in fplll. Finally, it contains a variant of the enumeration algorithm
197 that computes a lattice vector closest to a given vector belonging to
198 the real span of the lattice.")
199 (license license:lgpl2.1+)))
201 (define-public python-fpylll
203 (name "python-fpylll")
207 ;; Pypi contains and older release, so we use a tagged release from
211 (url "https://github.com/fplll/fpylll")
212 (commit (string-append version "dev"))))
213 (file-name (git-file-name name version))
216 "1a25iibihph626jl4wbs4b77xc4a2c4nfc2ypscf9wpani3dnhjf"))))
217 (build-system python-build-system)
222 ("pari-gp" ,pari-gp)))
224 `(("cysignals" ,python-cysignals)
225 ("cython" ,python-cython)
226 ("flake8" ,python-flake8)
227 ("numpy" ,python-numpy)
228 ("pytest" ,python-pytest)))
229 (home-page "https://github.com/fplll/fpylll")
230 (synopsis "Python interface for fplll")
231 (description "fpylll is a Python wrapper for fplll.")
232 (license license:gpl2+)))
234 (define-public pari-gp
241 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
245 "14xs90wrw8mbdx08hxlbhiahp6kgjq6yh27zjw7fvhfjx5nr84f8"))))
246 (build-system gnu-build-system)
248 `(("texlive" ,(texlive-union
249 (list texlive-amsfonts)))))
250 (inputs `(("gmp" ,gmp)
253 ("readline" ,readline)))
255 '(#:make-flags '("all")
256 #:test-target "dobench"
258 (modify-phases %standard-phases
260 (lambda* (#:key outputs #:allow-other-keys)
261 (invoke "./Configure"
262 (string-append "--prefix="
263 (assoc-ref outputs "out"))))))))
264 (synopsis "PARI/GP, a computer algebra system for number theory")
266 "PARI/GP is a widely used computer algebra system designed for fast
267 computations in number theory (factorisations, algebraic number theory,
268 elliptic curves...), but it also contains a large number of other useful
269 functions to compute with mathematical entities such as matrices,
270 polynomials, power series, algebraic numbers, etc., and a lot of
271 transcendental functions.
272 PARI is also available as a C library to allow for faster computations.")
273 (license license:gpl2+)
274 (home-page "https://pari.math.u-bordeaux.fr/")))
279 (version "0.0.11pl4")
283 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
287 "1cnnh7diqc97q76q5pyhpbljbhc0sz8mlrbqgiwi0sjkgh8iqsj0"))))
288 (build-system gnu-build-system)
289 (native-inputs `(("perl" ,perl)))
290 (inputs `(("pari-gp" ,pari-gp)))
293 (list (string-append "--with-paricfg="
294 (assoc-ref %build-inputs "pari-gp")
295 "/lib/pari/pari.cfg"))))
296 (synopsis "PARI/GP, a computer algebra system for number theory")
298 "PARI/GP is a widely used computer algebra system designed for fast
299 computations in number theory (factorisations, algebraic number theory,
300 elliptic curves...), but it also contains a large number of other useful
301 functions to compute with mathematical entities such as matrices,
302 polynomials, power series, algebraic numbers, etc., and a lot of
303 transcendental functions.
304 PARI is also available as a C library to allow for faster computations.
306 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
307 (license license:gpl2)
308 (home-page "https://pari.math.u-bordeaux.fr/")))
319 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
322 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
331 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
335 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
336 (build-system gnu-build-system)
342 ("fplll" ,fplll-4-cmh)
343 ("pari-gp" ,pari-gp)))
344 (synopsis "Igusa class polynomial computations")
346 "The CMH software computes Igusa (genus 2) class polynomials, which
347 parameterize the CM points in the moduli space of 2-dimensional abelian
348 varieties, i.e. Jacobians of hyperelliptic curves.
349 It can also be used to compute theta constants at arbitrary
351 (license license:gpl3+)
353 "https://gitlab.inria.fr/cmh/cmh#cmh-computation-of-genus-2-class-polynomials")))
362 ;; "~parisse/giac" is not used because the maintainer regularly
363 ;; overwrites the release tarball there, introducing a checksum
364 ;; mismatch every time. See
365 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
366 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
367 "~parisse/debian/dists/stable/main/source/"
368 "giac_" version ".tar.gz"))
370 (base32 "1dr1y88sx2gzldn0zl6p8b1ngjjcmh89iv4kzyhi2cf74j3yw85m"))))
371 (build-system gnu-build-system)
373 `(#:modules ((ice-9 ftw)
375 (guix build gnu-build-system))
377 (modify-phases %standard-phases
378 (add-after 'unpack 'patch-bin-cp
379 ;; Some Makefiles contain hard-coded "/bin/cp".
381 (substitute* (cons "micropython-1.12/xcas/Makefile"
382 (find-files "doc" "^Makefile"))
383 (("/bin/cp") (which "cp")))
385 (add-after 'unpack 'disable-failing-test
386 ;; FIXME: Test failing. Not sure why.
388 (substitute* "check/Makefile.in"
391 (add-after 'install 'fix-doc
392 (lambda* (#:key outputs #:allow-other-keys)
393 (let ((out (assoc-ref outputs "out")))
394 ;; Most French documentation has a non-commercial
395 ;; license, so we need to remove it.
396 (with-directory-excursion (string-append out "/share/giac/doc/fr")
397 (for-each delete-file-recursively
398 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
400 ;; Remove duplicate documentation in
401 ;; "%out/share/doc/giac/", where Xcas does not expect
403 (delete-file-recursively (string-append out "/share/doc/giac"))
405 (add-after 'install 'remove-unnecessary-executable
406 (lambda* (#:key outputs #:allow-other-keys)
407 (let ((out (assoc-ref outputs "out")))
408 (delete-file (string-append out "/bin/xcasnew"))
411 ;; TODO: Add libnauty, unbundle "libmicropython.a".
418 ("libjpeg" ,libjpeg-turbo)
420 ("libsamplerate" ,libsamplerate)
422 ("libxinerama" ,libxinerama)
436 ("python" ,python-wrapper)
437 ("readline" ,readline)
438 ("texlive" ,texlive-tiny)))
439 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
440 (synopsis "Computer algebra system")
442 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
443 maple, mupad and the TI89. It is available as a standalone program (graphic
444 or text interfaces) or as a C++ library.")
445 (license license:gpl3+)))
454 (uri (string-append "http://flintlib.org/flint-" version ".tar.gz"))
456 (base32 "1qrf6hzbbmg7mhkhbb0bab8z2xpdnba5cj4kmmf72lzs0457a6nf"))))
457 (build-system gnu-build-system)
462 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
464 `(#:parallel-tests? #f ; seems to be necessary on arm
466 (modify-phases %standard-phases
467 (add-before 'configure 'newer-c++
469 (substitute* "configure"
473 (lambda* (#:key inputs outputs #:allow-other-keys)
474 (let ((out (assoc-ref outputs "out"))
475 (gmp (assoc-ref inputs "gmp"))
476 (mpfr (assoc-ref inputs "mpfr"))
477 (ntl (assoc-ref inputs "ntl")))
478 ;; Do not pass "--enable-fast-install", which makes the
479 ;; homebrew configure process fail.
480 (invoke "./configure"
481 (string-append "--prefix=" out)
482 (string-append "--with-gmp=" gmp)
483 (string-append "--with-mpfr=" mpfr)
484 (string-append "--with-ntl=" ntl))
486 (synopsis "Fast library for number theory")
488 "FLINT is a C library for number theory. It supports arithmetic
489 with numbers, polynomials, power series and matrices over many base
490 rings, including multiprecision integers and rationals, integers
491 modulo n, p-adic numbers, finite fields (prime and non-prime order)
492 and real and complex numbers (via the Arb extension library).
494 Operations that can be performed include conversions, arithmetic,
495 GCDs, factoring, solving linear systems, and evaluating special
496 functions. In addition, FLINT provides various low-level routines for
498 (license license:lgpl2.1+)
499 (home-page "http://flintlib.org/")))
508 (url "https://github.com/fredrik-johansson/arb")
510 (file-name (git-file-name name version))
513 "15fx3dcbzgwddw9p1nysmx0dbh058afv5m8cj5pdjkcmcl7kw7z9"))))
514 (build-system gnu-build-system)
516 `(("flint" ,flint))) ; flint.h is included by arf.h
522 (modify-phases %standard-phases
524 (lambda* (#:key inputs outputs #:allow-other-keys)
525 (let ((out (assoc-ref outputs "out"))
526 (flint (assoc-ref inputs "flint"))
527 (gmp (assoc-ref inputs "gmp"))
528 (mpfr (assoc-ref inputs "mpfr")))
529 ;; Do not pass "--enable-fast-install", which makes the
530 ;; homebrew configure process fail.
531 (invoke "./configure"
532 (string-append "--prefix=" out)
533 (string-append "--with-flint=" flint)
534 (string-append "--with-gmp=" gmp)
535 (string-append "--with-mpfr=" mpfr))))))))
536 (synopsis "Arbitrary precision floating-point ball arithmetic")
538 "Arb is a C library for arbitrary-precision floating-point ball
539 arithmetic. It supports efficient high-precision computation with
540 polynomials, power series, matrices and special functions over the
541 real and complex numbers, with automatic, rigorous error control.")
542 (license license:lgpl2.1+)
543 (home-page "http://arblib.org")))
545 (define-public python-flint
547 (name "python-flint")
552 (url "https://github.com/fredrik-johansson/python-flint")
554 (file-name (git-file-name name version))
557 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
558 (patches (search-patches "python-flint-includes.patch"))))
559 (build-system python-build-system)
561 `(("python-cython" ,python-cython)))
563 `(("python-numpy" ,python-numpy)))
567 (synopsis "Python module wrapping ARB and FLINT")
569 "Python-flint is a Python extension module wrapping FLINT
570 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
571 arithmetic). It supports integers, rationals, modular integers,
572 real and complex ball arithmetic, polynomials and matrices over all
573 these types and other mathematical functions.")
574 (license license:expat)
575 (home-page "http://fredrikj.net/python-flint/")))
583 (uri (string-append "https://shoup.net/ntl/ntl-"
587 "1lisp3064rch3jaa2wrhy1s9kll7i3ka3d0y6lj6l3l4ckfcrhdp"))
588 (modules '((guix build utils)))
591 (delete-file-recursively "src/libtool-origin")
593 (build-system gnu-build-system)
595 `(("libtool" ,libtool)
596 ("perl" ,perl))) ; for configuration
602 (modify-phases %standard-phases
604 (lambda* (#:key inputs outputs #:allow-other-keys)
606 (invoke "./configure"
607 (string-append "PREFIX=" (assoc-ref outputs "out"))
608 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
609 ;; set the library prefixes explicitly so that they get
610 ;; embedded in the .la file
611 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
612 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
613 ;; Do not build especially for the build machine.
617 (synopsis "C++ library for number theory")
619 "NTL is a C++ library providing data structures and algorithms
620 for manipulating signed, arbitrary length integers, and for vectors,
621 matrices, and polynomials over the integers and over finite fields.")
622 (license license:gpl2+)
623 (home-page "https://shoup.net/ntl/")))
625 (define-public singular
633 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
637 (string-trim-right version #\p
638 0 (1- (string-length version)))
640 "/singular-" version ".tar.gz"))
642 "1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
643 (build-system gnu-build-system)
645 `(("doxygen" ,doxygen)
646 ("graphviz" ,graphviz)
655 ("readline" ,readline)))
658 (list (string-append "--with-ntl="
659 (assoc-ref %build-inputs "ntl")))))
660 (synopsis "Computer algebra system for polynomial computations")
662 "Singular is a computer algebra system for polynomial computations,
663 with special emphasis on commutative and non-commutative algebra, algebraic
664 geometry and singularity theory.")
665 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
666 ;; libraries with which it links are licensed under lgpl3+, so the
667 ;; combined work becomes gpl3. See COPYING in the source code.
668 (license license:gpl3)
669 (home-page "http://www.singular.uni-kl.de/index.php")))
671 (define-public gmp-ecm
677 ;; Use the ‘Latest version’ link for a stable URI across releases.
678 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
679 "latestfile/160/ecm-" version ".tar.gz"))
681 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
682 (build-system gnu-build-system)
686 `(#:configure-flags '("--enable-shared"
687 ;; Disable specific assembly routines, which depend
688 ;; on the subarchitecture of the build machine,
689 ;; and use gmp instead.
690 "--disable-asm-redc")))
691 (synopsis "Integer factorization library using the elliptic curve method")
693 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
694 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
696 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
697 ;; so the combined work is under gpl3+.
698 (license license:gpl3+)
699 (home-page "http://ecm.gforge.inria.fr/")))
707 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
710 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
711 (patches (search-patches "bc-fix-cross-compilation.patch"))))
712 (build-system gnu-build-system)
714 `(("automake" ,automake)
715 ("autoconf" ,autoconf)
718 ("texinfo" ,texinfo)))
721 (list "--with-readline")
723 (modify-phases %standard-phases
724 (add-after 'unpack 'autogen
726 (invoke "autoreconf" "-vif"))))))
727 (home-page "https://www.gnu.org/software/bc/")
728 (synopsis "Arbitrary precision numeric processing language")
730 "bc is an arbitrary precision numeric processing language. It includes
731 an interactive environment for evaluating mathematical statements. Its
732 syntax is similar to that of C, so basic usage is familiar. It also includes
733 \"dc\", a reverse-polish calculator.")
734 (license license:gpl2+)))
736 ;; The original kiss-fft does not have a complete build system and does not
737 ;; build any shared libraries. This is a fork used by Extempore.
738 (define-public kiss-fft-for-extempore
740 (name "kiss-fft-for-extempore")
745 (url "https://github.com/extemporelang/kiss_fft")
747 (file-name (git-file-name name version))
750 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
751 (build-system cmake-build-system)
752 (arguments `(#:tests? #f)) ; no tests included
753 ;; Extempore refuses to build on architectures other than x86_64
754 (supported-systems '("x86_64-linux"))
755 (home-page "https://github.com/extemporelang/kiss_fft")
756 (synopsis "Mixed-radix Fast Fourier Transform")
758 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
759 that can use fixed or floating data types and can easily be incorporated into
761 (license license:bsd-3)))
769 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
773 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
774 (build-system gnu-build-system)
777 '("--enable-shared" "--enable-openmp" "--enable-threads"
778 ,@(let ((system (or (%current-target-system) (%current-system))))
779 ;; Enable SIMD extensions for codelets. See details at:
780 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
782 ((string-prefix? "x86_64" system)
783 '("--enable-sse2" "--enable-avx" "--enable-avx2"
784 "--enable-avx512" "--enable-avx-128-fma"))
785 ((string-prefix? "i686" system)
787 ((string-prefix? "aarch64" system)
788 ;; Note that fftw supports NEON on 32-bit ARM only when
789 ;; compiled for single-precision.
793 ;; By default '-mtune=native' is used. However, that may cause the
794 ;; use of ISA extensions (e.g. AVX) that are not necessarily
795 ;; available on the user's machine when that package is built on a
796 ;; different machine.
797 "ax_cv_c_flags__mtune_native=no")))
798 (native-inputs `(("perl" ,perl)))
799 (home-page "http://fftw.org")
800 (synopsis "Computing the discrete Fourier transform")
802 "FFTW is a C subroutine library for computing the discrete Fourier
803 transform (DFT) in one or more dimensions, of arbitrary input size, and of
804 both real and complex data (as well as of even/odd data---i.e. the discrete
805 cosine/ sine transforms or DCT/DST).")
806 (license license:gpl2+)))
809 (package (inherit fftw)
812 (substitute-keyword-arguments (package-arguments fftw)
813 ((#:configure-flags fftw-configure-flags)
814 `(cons* "--enable-single"
815 ,@(if (string-prefix? "arm" (or (%current-target-system)
817 ;; fftw supports NEON on 32-bit ARM only when compiled
818 ;; for single-precision, so add it here.
821 ,fftw-configure-flags))))
823 (string-append (package-description fftw)
824 " Single-precision version."))))
826 (define-public fftw-openmpi
827 (package (inherit fftw)
828 (name "fftw-openmpi")
830 `(("openmpi" ,openmpi)
831 ,@(package-inputs fftw)))
833 (substitute-keyword-arguments (package-arguments fftw)
834 ((#:configure-flags cf)
835 `(cons "--enable-mpi" ,cf))
836 ((#:phases phases '%standard-phases)
837 `(modify-phases ,phases
838 (add-before 'check 'mpi-setup
841 (string-append (package-description fftw)
842 " With OpenMPI parallelism support."))))
844 (define-public java-la4j
851 (url "https://github.com/vkostyukov/la4j")
853 (file-name (string-append name "-" version "-checkout"))
856 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
857 (build-system ant-build-system)
859 `(#:jar-name "la4j.jar"
861 #:test-exclude (list "**/Abstract*.java"
863 "**/DenseMatrixTest.java"
864 "**/SparseMatrixTest.java"
866 "**/SparseVectorTest.java"
867 "**/DenseVectorTest.java")))
869 `(("java-junit" ,java-junit)
870 ("java-hamcrest-core" ,java-hamcrest-core)))
871 (home-page "http://la4j.org/")
872 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
873 (description "The la4j library is a Java library that provides Linear
874 Algebra primitives (matrices and vectors) and algorithms. The key features of
875 the la4j library are:
878 @item No dependencies and tiny size
879 @item Fluent object-oriented/functional API
880 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
881 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
882 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
883 @item MatrixMarket/CSV IO formats support for matrices and vectors
885 (license license:asl2.0)))
887 (define-public java-jlargearrays
889 (name "java-jlargearrays")
893 (uri (string-append "https://repo1.maven.org/maven2/"
894 "pl/edu/icm/JLargeArrays/"
895 version "/JLargeArrays-" version
897 (file-name (string-append name "-" version ".jar"))
900 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
901 (build-system ant-build-system)
903 `(#:jar-name "jlargearrays.jar"
904 #:tests? #f ; tests are not included in the release archive
907 `(("java-commons-math3" ,java-commons-math3)))
908 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
909 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
910 (description "JLargeArrays is a Java library of one-dimensional arrays
911 that can store up to 263 elements.")
912 (license license:bsd-2)))
914 (define-public java-jtransforms
916 (name "java-jtransforms")
920 (uri (string-append "https://repo1.maven.org/maven2/"
921 "com/github/wendykierp/JTransforms/"
922 version "/JTransforms-" version "-sources.jar"))
925 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
926 (build-system ant-build-system)
928 `(#:jar-name "jtransforms.jar"
929 #:tests? #f ; tests are not included in the release archive
932 `(("java-commons-math3" ,java-commons-math3)
933 ("java-jlargearrays" ,java-jlargearrays)))
934 (home-page "https://github.com/wendykierp/JTransforms")
935 (synopsis "Multithreaded FFT library written in pure Java")
936 (description "JTransforms is a multithreaded FFT library written in pure
937 Java. Currently, four types of transforms are available: @dfn{Discrete
938 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
939 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
940 (license license:bsd-2)))
949 (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
950 (commit (string-append "v" version))))
951 (file-name (git-file-name name version))
954 "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
955 (build-system cmake-build-system)
957 `(("perl" ,perl))) ; for pod2man
958 (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
959 (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
960 (description "lmfit is a C library for Levenberg-Marquardt least-squares
961 minimization and curve fitting. It is mature code, based on decades-old
962 algorithms from the FORTRAN library MINPACK.")
963 (license license:bsd-2)))
965 (define-public symengine
973 (url "https://github.com/symengine/symengine")
974 (commit (string-append "v" version))))
975 (file-name (git-file-name name version))
977 (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
978 (build-system cmake-build-system)
981 ;; These are the suggested build options in the README.
982 '("-DCMAKE_BUILD_TYPE=Release"
986 "-DINTEGER_CLASS=flint"
988 "-DWITH_SYMENGINE_THREAD_SAFE=on"
989 "-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
997 (home-page "https://github.com/symengine/symengine")
998 (synopsis "Fast symbolic manipulation library")
1000 "SymEngine is a standalone fast C++ symbolic manipulation library.
1001 Optional thin wrappers allow usage of the library from other languages.")
1002 (license (list license:expat ;SymEngine
1003 license:bsd-3)))) ;3rd party code
1005 (define-public eigen
1012 (string-append "https://bitbucket.org/eigen/eigen/get/"
1014 (string-append "mirror://debian/pool/main/e/eigen3/eigen3_"
1015 version ".orig.tar.bz2")))
1018 "1km3fyfzyqfdvmnl79drps3fjwnz3zbh0c7l34mfbqyvvs8cy4wz"))
1019 (file-name (string-append name "-" version ".tar.bz2"))
1020 (patches (search-patches "eigen-stabilise-sparseqr-test.patch"))
1021 (modules '((guix build utils)))
1023 ;; There are 3 test failures in the "unsupported" directory,
1024 ;; but maintainers say it's a known issue and it's unsupported
1025 ;; anyway, so just skip them.
1027 (substitute* "unsupported/CMakeLists.txt"
1028 (("add_subdirectory\\(test.*")
1029 "# Do not build the tests for unsupported features.\n"))
1031 (build-system cmake-build-system)
1033 '(;; Turn off debugging symbols to save space.
1034 #:build-type "Release"
1036 #:phases (modify-phases %standard-phases
1039 (let* ((cores (parallel-job-count))
1040 (dash-j (format #f "-j~a" cores)))
1041 (setenv "EIGEN_SEED" "1") ;for reproducibility
1042 ;; First build the tests, in parallel. See
1043 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
1044 (invoke "make" "buildtests" dash-j)
1046 ;; Then run 'CTest' with -V so we get more
1047 ;; details upon failure.
1048 (invoke "ctest" "-V" dash-j)))))))
1049 (home-page "https://eigen.tuxfamily.org")
1050 (synopsis "C++ template library for linear algebra")
1052 "Eigen is a C++ template library for linear algebra: matrices, vectors,
1053 numerical solvers, and related algorithms. It provides an elegant API based
1054 on \"expression templates\". It is versatile: it supports all matrix sizes,
1055 all standard numeric types, various matrix decompositions and geometry
1056 features, and more.")
1058 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
1059 ;; See 'COPYING.README' for details.
1060 (license license:mpl2.0)))
1062 (define-public eigen-for-tensorflow
1063 (let ((changeset "fd6845384b86")
1065 (package (inherit eigen)
1066 (name "eigen-for-tensorflow")
1067 (version (string-append "3.3.5-" revision "." changeset))
1071 (url "https://bitbucket.org/eigen/eigen")
1072 (changeset changeset)))
1075 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
1076 (file-name (string-append name "-" version "-checkout"))
1077 (modules '((guix build utils)))
1079 ;; There are 3 test failures in the "unsupported" directory,
1080 ;; but maintainers say it's a known issue and it's unsupported
1081 ;; anyway, so just skip them.
1083 (substitute* "unsupported/CMakeLists.txt"
1084 (("add_subdirectory\\(test.*")
1085 "# Do not build the tests for unsupported features.\n"))
1088 (define-public xtensor
1095 (url "https://github.com/xtensor-stack/xtensor")
1099 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1100 (file-name (git-file-name name version))))
1101 (build-system cmake-build-system)
1103 `(("googletest" ,googletest)
1107 '("-DBUILD_TESTS=ON")
1108 #:test-target "xtest"))
1109 (home-page "https://xtensor.readthedocs.io/en/latest/")
1110 (synopsis "C++ tensors with broadcasting and lazy computing")
1111 (description "xtensor is a C++ library meant for numerical analysis with
1112 multi-dimensional array expressions.
1116 @item an extensible expression system enabling lazy broadcasting.
1117 @item an API following the idioms of the C++ standard library.
1118 @item tools to manipulate array expressions and build upon xtensor.
1120 (license license:bsd-3)))
1129 (uri (string-append "https://files.gap-system.org/gap-"
1130 (version-major+minor version)
1135 (base32 "00l6hvy4iggnlrib4vp805sxdm3j7n3hzpv5zs9hbiiavh80l1xz"))
1136 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1139 ;; Delete the external gmp and zlib libraries
1140 ;; and a subdirectory not needed for our build.
1141 (for-each delete-file-recursively
1142 '("extern" "hpcgap"))
1143 ;; Delete a failing test.
1144 ;; FIXME: This might be fixed in the next release, see
1145 ;; https://github.com/gap-system/gap/issues/3292
1146 (delete-file "tst/testinstall/dir.tst")
1147 ;; Delete all packages except for a fixed list,
1148 ;; given by their names up to version numbers.
1149 (with-directory-excursion "pkg"
1150 (for-each delete-file-recursively
1152 (lambda (all keep) (string-prefix? keep all))
1155 ;; Necessary packages.
1158 "SmallGrp-" ; artistic2.0
1159 "transgrp" ; artistic2.0 for data,
1160 ; gpl2 or gpl3 for code
1161 ;; Recommended package.
1163 ;; Optional packages, searched for at start,
1164 ;; and their depedencies.
1168 "ctbllib" ; gpl3+, clarified in the next release;
1170 ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
1183 (build-system gnu-build-system)
1186 ("readline" ,readline)
1189 `(#:modules ((ice-9 ftw)
1191 (guix build gnu-build-system)
1194 (modify-phases %standard-phases
1195 (add-after 'build 'build-packages
1196 ;; Compile all packages that have not been deleted by the
1197 ;; code snippet above.
1199 (setenv "CONFIG_SHELL" (which "bash"))
1200 (with-directory-excursion "pkg"
1201 (invoke "../bin/BuildPackages.sh")
1203 (add-after 'build-packages 'build-doc
1204 ;; The documentation is bundled, but we create it from source.
1206 (with-directory-excursion "doc"
1207 (invoke "./make_doc"))
1210 (lambda* (#:key outputs #:allow-other-keys)
1211 (let* ((out (assoc-ref outputs "out"))
1212 (bin (string-append out "/bin"))
1213 (prog (string-append bin "/gap"))
1214 (prog-real (string-append bin "/.gap-real"))
1215 (share (string-append out "/share/gap")))
1216 ;; Install only the gap binary; the gac compiler is left
1217 ;; for maybe later. "Wrap" it in a shell script that calls
1218 ;; the binary with the correct parameter.
1219 ;; The make target install-bin is supposed to do that, but
1220 ;; is not currently working.
1222 (copy-file "gap" prog-real)
1223 (call-with-output-file prog
1226 "#!~a~%exec ~a -l ~a \"$@\"~%"
1231 ;; Install the headers and library, which are needed by Sage.
1232 (invoke "make" "install-headers")
1233 (invoke "make" "install-libgap")
1234 ;; Remove information on the build directory from sysinfo.gap.
1235 (substitute* "sysinfo.gap"
1236 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1237 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1238 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1239 (invoke "make" "install-gaproot")
1240 ;; Copy the directory of compiled packages; the make target
1241 ;; install-pkg is currently empty.
1242 (copy-recursively "pkg" (string-append share "/pkg")))
1244 (home-page "https://www.gap-system.org/")
1246 "System for computational group theory")
1248 "GAP is a system for computational discrete algebra, with particular
1249 emphasis on computational group theory. It provides a programming language,
1250 a library of thousands of functions implementing algebraic algorithms
1251 written in the GAP language as well as large data libraries of algebraic
1253 ;; Some packages have different licenses (effectively forcing the
1254 ;; combined work to be licensed as gpl3+); if this is the case, this
1255 ;; is mentioned above next to their name.
1256 ;; Some packages have no license mentioned explicitly; supposedly this
1257 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1258 ;; safe side, we drop them for now.
1259 (license license:gpl2+)))
1261 (define-public givaro
1268 (url "https://github.com/linbox-team/givaro")
1269 (commit (string-append "v" version))))
1270 (file-name (git-file-name name version))
1273 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1274 (build-system gnu-build-system)
1276 `(("autoconf" ,autoconf)
1277 ("automake" ,automake)
1278 ("libtool" ,libtool)))
1280 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1281 (synopsis "Algebraic computations with exact rings and fields")
1283 "Givaro is a C++ library implementing the basic arithmetic of various
1284 algebraic objects: prime fields, extension fields, finite fields, finite
1285 rings, polynomials, algebraic numbers, arbitrary precision integers and
1286 rationals (C++ wrappers over gmp), fixed precision integers. It also
1287 provides data-structures and templated classes for the manipulation of
1288 compound objects, such as vectors, matrices and univariate polynomials.")
1289 (license license:cecill-b)
1290 (home-page "https://github.com/linbox-team/givaro")))
1292 (define-public fflas-ffpack
1294 (name "fflas-ffpack")
1299 (url "https://github.com/linbox-team/fflas-ffpack")
1301 (file-name (git-file-name name version))
1304 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1305 (build-system gnu-build-system)
1307 `(("autoconf" ,autoconf)
1308 ("automake" ,automake)
1309 ("libtool" ,libtool)
1310 ("pkg-config" ,pkg-config)))
1312 `(("openblas" ,openblas)))
1314 `(("givaro" ,givaro))) ; required according to the .pc file
1317 (list (string-append "--with-blas-libs="
1318 (assoc-ref %build-inputs "openblas")
1319 "/lib/libopenblas.so"))))
1320 (synopsis "C++ library for linear algebra over finite fields")
1322 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1323 operations over a finite field.
1324 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1325 of a subset of routines of the numerical BLAS; it also supports sparse
1326 matrix-vector products.
1327 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1328 library to provide functionalities of higher level, using the kernel
1329 of a BLAS. Additionally, it provides routines specific to exact linear
1330 algebra, such as the row echelon form.")
1331 (license license:lgpl2.1+)
1332 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1334 (define-public linbox
1341 (url "https://github.com/linbox-team/linbox")
1342 (commit (string-append "v" version))))
1343 (file-name (git-file-name name version))
1346 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
1347 (patches (search-patches "linbox-fix-pkgconfig.patch"))))
1348 (build-system gnu-build-system)
1350 `(("autoconf" ,autoconf)
1351 ("automake" ,automake)
1352 ("libtool" ,libtool)
1353 ("pkg-config" ,pkg-config)))
1355 `(("fflas-ffpack" ,fflas-ffpack)))
1356 (synopsis "C++ library for linear algebra over exact rings")
1358 "LinBox is a C++ template library for exact linear algebra computation
1359 with dense, sparse, and structured matrices over the integers and over
1361 (license license:lgpl2.1+)
1362 (home-page "https://linbox-team.github.io/linbox/")))
1367 (version "20140914")
1371 (url "https://bitbucket.org/malb/m4ri")
1372 (commit (string-append "release-" version))))
1373 (file-name (git-file-name name version))
1376 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1377 (build-system gnu-build-system)
1379 `(("autoconf" ,autoconf)
1380 ("automake" ,automake)
1381 ("libtool" ,libtool)
1382 ("pkg-config" ,pkg-config)))
1384 `(("libpng" ,libpng)))
1385 (synopsis "Arithmetic of dense matrices over F_2")
1386 (description "M4RI is a library for fast arithmetic with dense matrices
1387 over F2. The name M4RI comes from the first implemented algorithm: The
1388 Method of the Four Russians inversion algorithm published by Gregory Bard.
1389 This algorithm in turn is named after the Method of the Four Russians
1390 multiplication algorithm.")
1391 (license license:gpl2+)
1392 (home-page "https://bitbucket.org/malb/m4ri/")))
1394 (define-public symmetrica
1399 (method url-fetch/tarbomb)
1400 (uri (let ((v (string-join (string-split version #\.) "_")))
1401 (string-append "http://www.algorithm.uni-bayreuth.de/"
1402 "en/research/SYMMETRICA/"
1403 "SYM" v "_tar.gz")))
1406 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1407 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1408 (patches (search-patches "symmetrica-bruch.patch"
1409 "symmetrica-int32.patch"
1410 "symmetrica-return_values.patch"
1411 "symmetrica-sort_sum_rename.patch"))))
1412 (build-system gnu-build-system)
1414 `(#:tests? #f ;no test
1416 (modify-phases %standard-phases
1417 (add-after 'unpack 'fix-makefile
1419 (substitute* "makefile"
1420 (("cc -c") "gcc -c -fPIC"))
1422 (add-after 'fix-makefile 'turn-off-banner
1425 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1427 (delete 'configure) ;no configure script
1428 (replace 'install ;no install target
1429 (lambda* (#:key outputs #:allow-other-keys)
1430 (let* ((out (assoc-ref outputs "out"))
1431 (lib (string-append out "/lib"))
1432 (inc (string-append out "/include/symmetrica"))
1433 (doc (string-append out "/share/doc/symmetrica-" ,version))
1434 (static "libsymmetrica.a"))
1435 ;; Build static library.
1436 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1437 (invoke "ranlib" static)
1438 ;; Install static library and headers.
1439 (for-each (lambda (f) (install-file f inc))
1440 (find-files "." "\\.h$"))
1441 (install-file "libsymmetrica.a" lib)
1442 ;; Install documentation.
1443 (for-each (lambda (f) (install-file f doc))
1444 (find-files "." "\\.doc$"))
1446 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1447 (synopsis "Combinatoric C Library")
1448 (description "Symmetrica is a library for combinatorics. It has support
1449 for the representation theory of the symmetric group and related groups,
1450 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1451 polynomials, and the representation theory of Hecke algebras of type A_n.")
1452 (license license:public-domain)))
1454 (define-public m4rie
1457 (version "20150908")
1461 (url "https://bitbucket.org/malb/m4rie")
1462 (commit (string-append "release-" version))))
1463 (file-name (git-file-name name version))
1466 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1467 (build-system gnu-build-system)
1469 `(("autoconf" ,autoconf)
1470 ("automake" ,automake)
1471 ("libtool" ,libtool)))
1474 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1475 (description "M4RI is a library for fast arithmetic with dense matrices
1476 over finite fields of characteristic 2. So it extends the functionality
1477 of M4RI from F_2 to F_{2^e}.")
1478 (license license:gpl2+)
1479 (home-page "https://bitbucket.org/malb/m4rie/")))
1481 (define-public eclib
1484 (version "20190909")
1488 (url "https://github.com/JohnCremona/eclib/")
1489 (commit (string-append "v" version))))
1490 (file-name (git-file-name name version))
1493 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1494 (build-system gnu-build-system)
1496 `(("autoconf" ,autoconf)
1497 ("automake" ,automake)
1498 ("libtool" ,libtool)))
1501 ("pari-gp" ,pari-gp)))
1502 (synopsis "Ranks of elliptic curves and modular symbols")
1503 (description "The eclib package includes mwrank (for 2-descent on
1504 elliptic curves over Q) and modular symbol code; it has been written by
1505 John Cremona to compute his elliptic curve database.")
1506 (license license:gpl2+)
1507 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1508 "J.E.Cremona/mwrank/index.html"))))
1510 (define-public lrcalc
1517 (url "https://bitbucket.org/asbuch/lrcalc")
1518 (commit (string-append "lrcalc-" version))))
1519 (file-name (git-file-name name version))
1522 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1523 (patches (search-patches "lrcalc-includes.patch"))))
1524 (build-system gnu-build-system)
1526 `(("autoconf" ,autoconf)
1527 ("automake" ,automake)
1528 ("libtool" ,libtool)))
1531 (modify-phases %standard-phases
1532 (add-before 'build 'fix-permission
1534 (chmod "lrcalc.maple.src" #o644)
1536 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1537 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1538 program designed to compute Littlewood-Richardson coefficients. It computes
1539 single Littlewood-Richardson coefficients, products of Schur functions, or
1540 skew Schur functions. In addition it computes products in the small quantum
1541 cohomology ring of a Grassmann variety. The software package also includes
1542 a program that performs fast computation of the more general multiplicative
1543 structure constants of Schubert polynomials.")
1544 (license license:gpl2+)
1545 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1554 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1555 version ".tar.bz2"))
1558 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1559 (build-system gnu-build-system)
1562 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1563 ; mentions ATLAS in particular
1568 (string-append "--with-gmp-include="
1569 (assoc-ref %build-inputs "gmp") "/include")
1570 (string-append "--with-gmp-lib="
1571 (assoc-ref %build-inputs "gmp") "/lib")
1572 "--with-cblas=-lopenblas"
1573 (string-append "--with-cblas-include="
1574 (assoc-ref %build-inputs "cblas") "/include")
1575 (string-append "--with-cblas-lib="
1576 (assoc-ref %build-inputs "cblas") "/lib"))))
1577 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1579 "Solver for systems of linear equations over the integers")
1581 "IML is a C library implementing algorithms for computing exact
1582 solutions to dense systems of linear equations over the integers.
1583 Currently, IML provides the following functionality:
1586 @item Nonsingular rational system solving:
1587 compute the unique rational solution X to the system AX=B, where A and B
1588 are integer matrices, A nonsingular.
1589 @item Compute the right nullspace or kernel of an integer matrix.
1590 @item Certified linear system solving:
1591 compute a minimal denominator solution x to a system Ax=b, where b is an
1592 integer vector and A is an integer matrix with arbitrary shape and
1596 In addition, IML provides some low level routines for a variety of mod p
1597 matrix operations: computing the row-echelon form, determinant, rank
1598 profile, and inverse of a mod p matrix. These mod p routines are not
1599 general purpose; they require that p satisfy some preconditions based on
1600 the dimension of the input matrix (usually p should be prime and should be
1601 no more than about 20 bits long).")
1602 (license license:bsd-3)))