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, 2021 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 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 "1cgwdpw8b797883z9y92ixxjkv72kiy65zsw2qqf5and1kbzgv41"))))
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/")))
283 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
287 "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"))))
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/")))
316 ;; Git repo at <https://gitlab.inria.fr/cmh/cmh>.
317 (uri (string-append "http://www.multiprecision.org/downloads/cmh-"
321 "1ws2yhzxmm2l5xqqqcjcimmg40f9qq5l9i6d4i5434an9v9s8531"))))
322 (build-system gnu-build-system)
329 ("pari-gp" ,pari-gp)))
330 (synopsis "Igusa class polynomial computations")
332 "The CMH software computes Igusa (genus 2) class polynomials, which
333 parameterize the CM points in the moduli space of 2-dimensional abelian
334 varieties, i.e. Jacobians of hyperelliptic curves.
335 It can also be used to compute theta constants at arbitrary
337 (license license:gpl3+)
338 (home-page "http://www.multiprecision.org/cmh/home.html")))
347 ;; "~parisse/giac" is not used because the maintainer regularly
348 ;; overwrites the release tarball there, introducing a checksum
349 ;; mismatch every time. See
350 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
351 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
352 "~parisse/debian/dists/stable/main/source/"
353 "giac_" version ".tar.gz"))
355 (base32 "15sgsr8l6njp5spagbqclqkdy3x7ra23wi6wvpc8vzlbivy3v43k"))))
356 (build-system gnu-build-system)
358 `(#:modules ((ice-9 ftw)
360 (guix build gnu-build-system))
362 (modify-phases %standard-phases
363 (add-after 'unpack 'patch-bin-cp
364 ;; Some Makefiles contain hard-coded "/bin/cp".
366 (substitute* (cons "micropython-1.12/xcas/Makefile"
367 (find-files "doc" "^Makefile"))
368 (("/bin/cp") (which "cp")))
370 (add-after 'unpack 'disable-failing-test
371 ;; FIXME: Test failing. Not sure why.
373 (substitute* "check/Makefile.in"
376 (add-after 'install 'fix-doc
377 (lambda* (#:key outputs #:allow-other-keys)
378 (let ((out (assoc-ref outputs "out")))
379 ;; Most French documentation has a non-commercial
380 ;; license, so we need to remove it.
381 (with-directory-excursion (string-append out "/share/giac/doc/fr")
382 (for-each delete-file-recursively
383 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
385 ;; Remove duplicate documentation in
386 ;; "%out/share/doc/giac/", where Xcas does not expect
388 (delete-file-recursively (string-append out "/share/doc/giac"))
390 (add-after 'install 'remove-unnecessary-executable
391 (lambda* (#:key outputs #:allow-other-keys)
392 (let ((out (assoc-ref outputs "out")))
393 (delete-file (string-append out "/bin/xcasnew"))
396 ;; TODO: Add libnauty, unbundle "libmicropython.a".
403 ("libjpeg" ,libjpeg-turbo)
405 ("libsamplerate" ,libsamplerate)
407 ("libxinerama" ,libxinerama)
421 ("python" ,python-wrapper)
422 ("readline" ,readline)
423 ("texlive" ,texlive-tiny)))
424 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
425 (synopsis "Computer algebra system")
427 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
428 maple, mupad and the TI89. It is available as a standalone program (graphic
429 or text interfaces) or as a C++ library.")
430 (license license:gpl3+)))
439 (uri (string-append "http://flintlib.org/flint-" version ".tar.gz"))
441 (base32 "1qrf6hzbbmg7mhkhbb0bab8z2xpdnba5cj4kmmf72lzs0457a6nf"))))
442 (build-system gnu-build-system)
447 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
449 `(#:parallel-tests? #f ; seems to be necessary on arm
451 (modify-phases %standard-phases
452 (add-before 'configure 'newer-c++
454 (substitute* "configure"
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 (ntl (assoc-ref inputs "ntl")))
463 ;; Do not pass "--enable-fast-install", which makes the
464 ;; homebrew configure process fail.
465 (invoke "./configure"
466 (string-append "--prefix=" out)
467 (string-append "--with-gmp=" gmp)
468 (string-append "--with-mpfr=" mpfr)
469 (string-append "--with-ntl=" ntl))
471 (synopsis "Fast library for number theory")
473 "FLINT is a C library for number theory. It supports arithmetic
474 with numbers, polynomials, power series and matrices over many base
475 rings, including multiprecision integers and rationals, integers
476 modulo n, p-adic numbers, finite fields (prime and non-prime order)
477 and real and complex numbers (via the Arb extension library).
479 Operations that can be performed include conversions, arithmetic,
480 GCDs, factoring, solving linear systems, and evaluating special
481 functions. In addition, FLINT provides various low-level routines for
483 (license license:lgpl2.1+)
484 (home-page "http://flintlib.org/")))
493 (url "https://github.com/fredrik-johansson/arb")
495 (file-name (git-file-name name version))
498 "15fx3dcbzgwddw9p1nysmx0dbh058afv5m8cj5pdjkcmcl7kw7z9"))))
499 (build-system gnu-build-system)
501 `(("flint" ,flint))) ; flint.h is included by arf.h
507 (modify-phases %standard-phases
509 (lambda* (#:key inputs outputs #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out"))
511 (flint (assoc-ref inputs "flint"))
512 (gmp (assoc-ref inputs "gmp"))
513 (mpfr (assoc-ref inputs "mpfr")))
514 ;; Do not pass "--enable-fast-install", which makes the
515 ;; homebrew configure process fail.
516 (invoke "./configure"
517 (string-append "--prefix=" out)
518 (string-append "--with-flint=" flint)
519 (string-append "--with-gmp=" gmp)
520 (string-append "--with-mpfr=" mpfr))))))))
521 (home-page "https://arblib.org")
522 (synopsis "Arbitrary precision floating-point ball arithmetic")
524 "Arb is a C library for arbitrary-precision floating-point ball
525 arithmetic. It supports efficient high-precision computation with
526 polynomials, power series, matrices and special functions over the
527 real and complex numbers, with automatic, rigorous error control.")
528 (license license:lgpl2.1+)))
530 (define-public python-flint
532 (name "python-flint")
537 (url "https://github.com/fredrik-johansson/python-flint")
539 (file-name (git-file-name name version))
542 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
543 (patches (search-patches "python-flint-includes.patch"))))
544 (build-system python-build-system)
546 `(("python-cython" ,python-cython)))
548 `(("python-numpy" ,python-numpy)))
552 (synopsis "Python module wrapping ARB and FLINT")
554 "Python-flint is a Python extension module wrapping FLINT
555 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
556 arithmetic). It supports integers, rationals, modular integers,
557 real and complex ball arithmetic, polynomials and matrices over all
558 these types and other mathematical functions.")
559 (license license:expat)
560 (home-page "https://fredrikj.net/python-flint/")))
568 (uri (string-append "https://shoup.net/ntl/ntl-"
572 "1lisp3064rch3jaa2wrhy1s9kll7i3ka3d0y6lj6l3l4ckfcrhdp"))
573 (modules '((guix build utils)))
576 (delete-file-recursively "src/libtool-origin")
578 (build-system gnu-build-system)
580 `(("libtool" ,libtool)
581 ("perl" ,perl))) ; for configuration
587 (modify-phases %standard-phases
589 (lambda* (#:key inputs outputs #:allow-other-keys)
591 (invoke "./configure"
592 (string-append "PREFIX=" (assoc-ref outputs "out"))
593 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
594 ;; set the library prefixes explicitly so that they get
595 ;; embedded in the .la file
596 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
597 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
598 ;; Do not build especially for the build machine.
602 (synopsis "C++ library for number theory")
604 "NTL is a C++ library providing data structures and algorithms
605 for manipulating signed, arbitrary length integers, and for vectors,
606 matrices, and polynomials over the integers and over finite fields.")
607 (license license:gpl2+)
608 (home-page "https://shoup.net/ntl/")))
610 (define-public singular
618 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
622 (string-trim-right version #\p
623 0 (1- (string-length version)))
625 "/singular-" version ".tar.gz"))
627 "1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
628 (build-system gnu-build-system)
630 `(("doxygen" ,doxygen)
631 ("graphviz" ,graphviz)
640 ("readline" ,readline)))
643 (list (string-append "--with-ntl="
644 (assoc-ref %build-inputs "ntl")))))
645 (synopsis "Computer algebra system for polynomial computations")
647 "Singular is a computer algebra system for polynomial computations,
648 with special emphasis on commutative and non-commutative algebra, algebraic
649 geometry and singularity theory.")
650 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
651 ;; libraries with which it links are licensed under lgpl3+, so the
652 ;; combined work becomes gpl3. See COPYING in the source code.
653 (license license:gpl3)
654 (home-page "http://www.singular.uni-kl.de/index.php")))
656 (define-public gmp-ecm
663 (let ((hash "00c4c691a1ef8605b65bdf794a71539d"))
664 (string-append "https://gitlab.inria.fr/zimmerma/ecm/"
665 "uploads/" hash "/ecm-" version
668 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
669 (build-system gnu-build-system)
673 `(#:configure-flags '("--enable-shared"
674 ;; Disable specific assembly routines, which depend
675 ;; on the subarchitecture of the build machine,
676 ;; and use gmp instead.
677 "--disable-asm-redc")))
678 (synopsis "Integer factorization library using the elliptic curve method")
680 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
681 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
683 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
684 ;; so the combined work is under gpl3+.
685 (license license:gpl3+)
686 (home-page "http://ecm.gforge.inria.fr/")))
694 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
697 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
698 (patches (search-patches "bc-fix-cross-compilation.patch"))))
699 (build-system gnu-build-system)
701 `(("automake" ,automake)
702 ("autoconf" ,autoconf)
705 ("texinfo" ,texinfo)))
708 (list "--with-readline")
710 (modify-phases %standard-phases
711 (add-after 'unpack 'autogen
713 (invoke "autoreconf" "-vif"))))))
714 (home-page "https://www.gnu.org/software/bc/")
715 (synopsis "Arbitrary precision numeric processing language")
717 "bc is an arbitrary precision numeric processing language. It includes
718 an interactive environment for evaluating mathematical statements. Its
719 syntax is similar to that of C, so basic usage is familiar. It also includes
720 \"dc\", a reverse-polish calculator.")
721 (license license:gpl2+)))
723 ;; The original kiss-fft does not have a complete build system and does not
724 ;; build any shared libraries. This is a fork used by Extempore.
725 (define-public kiss-fft-for-extempore
727 (name "kiss-fft-for-extempore")
732 (url "https://github.com/extemporelang/kiss_fft")
734 (file-name (git-file-name name version))
737 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
738 (build-system cmake-build-system)
739 (arguments `(#:tests? #f)) ; no tests included
740 ;; Extempore refuses to build on architectures other than x86_64
741 (supported-systems '("x86_64-linux"))
742 (home-page "https://github.com/extemporelang/kiss_fft")
743 (synopsis "Mixed-radix Fast Fourier Transform")
745 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
746 that can use fixed or floating data types and can easily be incorporated into
748 (license license:bsd-3)))
756 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
760 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
761 (build-system gnu-build-system)
764 '("--enable-shared" "--enable-openmp" "--enable-threads"
765 ,@(let ((system (or (%current-target-system) (%current-system))))
766 ;; Enable SIMD extensions for codelets. See details at:
767 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
769 ((string-prefix? "x86_64" system)
770 '("--enable-sse2" "--enable-avx" "--enable-avx2"
771 "--enable-avx512" "--enable-avx-128-fma"))
772 ((string-prefix? "i686" system)
774 ((string-prefix? "aarch64" system)
775 ;; Note that fftw supports NEON on 32-bit ARM only when
776 ;; compiled for single-precision.
780 ;; By default '-mtune=native' is used. However, that may cause the
781 ;; use of ISA extensions (e.g. AVX) that are not necessarily
782 ;; available on the user's machine when that package is built on a
783 ;; different machine.
784 "ax_cv_c_flags__mtune_native=no")))
785 (native-inputs `(("perl" ,perl)))
786 (home-page "http://fftw.org")
787 (synopsis "Computing the discrete Fourier transform")
789 "FFTW is a C subroutine library for computing the discrete Fourier
790 transform (DFT) in one or more dimensions, of arbitrary input size, and of
791 both real and complex data (as well as of even/odd data---i.e. the discrete
792 cosine/ sine transforms or DCT/DST).")
793 (license license:gpl2+)))
796 (package (inherit fftw)
799 (substitute-keyword-arguments (package-arguments fftw)
800 ((#:configure-flags fftw-configure-flags)
801 `(cons* "--enable-single"
802 ,@(if (string-prefix? "arm" (or (%current-target-system)
804 ;; fftw supports NEON on 32-bit ARM only when compiled
805 ;; for single-precision, so add it here.
808 ,fftw-configure-flags))))
810 (string-append (package-description fftw)
811 " Single-precision version."))))
813 (define-public fftw-openmpi
814 (package (inherit fftw)
815 (name "fftw-openmpi")
817 `(("openmpi" ,openmpi)
818 ,@(package-inputs fftw)))
820 (substitute-keyword-arguments (package-arguments fftw)
821 ((#:configure-flags cf)
822 `(cons "--enable-mpi" ,cf))
823 ((#:phases phases '%standard-phases)
824 `(modify-phases ,phases
825 (add-before 'check 'mpi-setup
828 (string-append (package-description fftw)
829 " With OpenMPI parallelism support."))))
831 (define-public java-la4j
838 (url "https://github.com/vkostyukov/la4j")
840 (file-name (string-append name "-" version "-checkout"))
843 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
844 (build-system ant-build-system)
846 `(#:jar-name "la4j.jar"
848 #:test-exclude (list "**/Abstract*.java"
850 "**/DenseMatrixTest.java"
851 "**/SparseMatrixTest.java"
853 "**/SparseVectorTest.java"
854 "**/DenseVectorTest.java")))
856 `(("java-junit" ,java-junit)
857 ("java-hamcrest-core" ,java-hamcrest-core)))
858 (home-page "http://la4j.org/")
859 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
860 (description "The la4j library is a Java library that provides Linear
861 Algebra primitives (matrices and vectors) and algorithms. The key features of
862 the la4j library are:
865 @item No dependencies and tiny size
866 @item Fluent object-oriented/functional API
867 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
868 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
869 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
870 @item MatrixMarket/CSV IO formats support for matrices and vectors
872 (license license:asl2.0)))
874 (define-public java-jlargearrays
876 (name "java-jlargearrays")
880 (uri (string-append "https://repo1.maven.org/maven2/"
881 "pl/edu/icm/JLargeArrays/"
882 version "/JLargeArrays-" version
884 (file-name (string-append name "-" version ".jar"))
887 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
888 (build-system ant-build-system)
890 `(#:jar-name "jlargearrays.jar"
891 #:tests? #f ; tests are not included in the release archive
894 `(("java-commons-math3" ,java-commons-math3)))
895 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
896 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
897 (description "JLargeArrays is a Java library of one-dimensional arrays
898 that can store up to 263 elements.")
899 (license license:bsd-2)))
901 (define-public java-jtransforms
903 (name "java-jtransforms")
907 (uri (string-append "https://repo1.maven.org/maven2/"
908 "com/github/wendykierp/JTransforms/"
909 version "/JTransforms-" version "-sources.jar"))
912 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
913 (build-system ant-build-system)
915 `(#:jar-name "jtransforms.jar"
916 #:tests? #f ; tests are not included in the release archive
919 `(("java-commons-math3" ,java-commons-math3)
920 ("java-jlargearrays" ,java-jlargearrays)))
921 (home-page "https://github.com/wendykierp/JTransforms")
922 (synopsis "Multithreaded FFT library written in pure Java")
923 (description "JTransforms is a multithreaded FFT library written in pure
924 Java. Currently, four types of transforms are available: @dfn{Discrete
925 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
926 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
927 (license license:bsd-2)))
936 (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
937 (commit (string-append "v" version))))
938 (file-name (git-file-name name version))
941 "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
942 (build-system cmake-build-system)
944 `(("perl" ,perl))) ; for pod2man
945 (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
946 (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
947 (description "lmfit is a C library for Levenberg-Marquardt least-squares
948 minimization and curve fitting. It is mature code, based on decades-old
949 algorithms from the FORTRAN library MINPACK.")
950 (license license:bsd-2)))
952 (define-public symengine
960 (url "https://github.com/symengine/symengine")
961 (commit (string-append "v" version))))
962 (file-name (git-file-name name version))
964 (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
965 (build-system cmake-build-system)
968 ;; These are the suggested build options in the README.
969 '("-DCMAKE_BUILD_TYPE=Release"
973 "-DINTEGER_CLASS=flint"
975 "-DWITH_SYMENGINE_THREAD_SAFE=on"
976 "-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
984 (home-page "https://github.com/symengine/symengine")
985 (synopsis "Fast symbolic manipulation library")
987 "SymEngine is a standalone fast C++ symbolic manipulation library.
988 Optional thin wrappers allow usage of the library from other languages.")
989 (license (list license:expat ;SymEngine
990 license:bsd-3)))) ;3rd party code
999 (string-append "https://bitbucket.org/eigen/eigen/get/"
1001 (string-append "mirror://debian/pool/main/e/eigen3/eigen3_"
1002 version ".orig.tar.bz2")))
1005 "1vxrsncfnkyq6gwxpsannpryp12mk7lc8f42ybvz3saf7icwc582"))
1006 (file-name (string-append name "-" version ".tar.bz2"))
1007 (patches (search-patches "eigen-remove-openmp-error-counting.patch"
1008 "eigen-stabilise-sparseqr-test.patch"))
1009 (modules '((guix build utils)))
1011 ;; There are 3 test failures in the "unsupported" directory,
1012 ;; but maintainers say it's a known issue and it's unsupported
1013 ;; anyway, so just skip them.
1015 (substitute* "unsupported/CMakeLists.txt"
1016 (("add_subdirectory\\(test.*")
1017 "# Do not build the tests for unsupported features.\n"))
1019 (build-system cmake-build-system)
1021 '(;; Turn off debugging symbols to save space.
1022 #:build-type "Release"
1024 #:phases (modify-phases %standard-phases
1027 (let* ((cores (parallel-job-count))
1028 (dash-j (format #f "-j~a" cores)))
1029 (setenv "EIGEN_SEED" "1") ;for reproducibility
1030 ;; First build the tests, in parallel. See
1031 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
1032 (invoke "make" "buildtests" dash-j)
1034 ;; Then run 'CTest' with -V so we get more
1035 ;; details upon failure.
1036 (invoke "ctest" "-V" dash-j)))))))
1037 (home-page "https://eigen.tuxfamily.org")
1038 (synopsis "C++ template library for linear algebra")
1040 "Eigen is a C++ template library for linear algebra: matrices, vectors,
1041 numerical solvers, and related algorithms. It provides an elegant API based
1042 on \"expression templates\". It is versatile: it supports all matrix sizes,
1043 all standard numeric types, various matrix decompositions and geometry
1044 features, and more.")
1046 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
1047 ;; See 'COPYING.README' for details.
1048 (license license:mpl2.0)))
1050 (define-public eigen-for-tensorflow
1051 (let ((changeset "fd6845384b86")
1053 (package (inherit eigen)
1054 (name "eigen-for-tensorflow")
1055 (version (string-append "3.3.5-" revision "." changeset))
1059 (url "https://bitbucket.org/eigen/eigen")
1060 (changeset changeset)))
1063 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
1064 (file-name (string-append name "-" version "-checkout"))
1065 (modules '((guix build utils)))
1067 ;; There are 3 test failures in the "unsupported" directory,
1068 ;; but maintainers say it's a known issue and it's unsupported
1069 ;; anyway, so just skip them.
1071 (substitute* "unsupported/CMakeLists.txt"
1072 (("add_subdirectory\\(test.*")
1073 "# Do not build the tests for unsupported features.\n"))
1076 (define-public xtensor
1083 (url "https://github.com/xtensor-stack/xtensor")
1087 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1088 (file-name (git-file-name name version))))
1089 (build-system cmake-build-system)
1091 `(("googletest" ,googletest)
1095 '("-DBUILD_TESTS=ON")
1096 #:test-target "xtest"))
1097 (home-page "https://xtensor.readthedocs.io/en/latest/")
1098 (synopsis "C++ tensors with broadcasting and lazy computing")
1099 (description "xtensor is a C++ library meant for numerical analysis with
1100 multi-dimensional array expressions.
1104 @item an extensible expression system enabling lazy broadcasting.
1105 @item an API following the idioms of the C++ standard library.
1106 @item tools to manipulate array expressions and build upon xtensor.
1108 (license license:bsd-3)))
1117 (uri (string-append "https://files.gap-system.org/gap-"
1118 (version-major+minor version)
1123 (base32 "00l6hvy4iggnlrib4vp805sxdm3j7n3hzpv5zs9hbiiavh80l1xz"))
1124 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1127 ;; Delete the external gmp and zlib libraries
1128 ;; and a subdirectory not needed for our build.
1129 (for-each delete-file-recursively
1130 '("extern" "hpcgap"))
1131 ;; Delete a failing test.
1132 ;; FIXME: This might be fixed in the next release, see
1133 ;; https://github.com/gap-system/gap/issues/3292
1134 (delete-file "tst/testinstall/dir.tst")
1135 ;; Delete all packages except for a fixed list,
1136 ;; given by their names up to version numbers.
1137 (with-directory-excursion "pkg"
1138 (for-each delete-file-recursively
1140 (lambda (all keep) (string-prefix? keep all))
1143 ;; Necessary packages.
1146 "SmallGrp-" ; artistic2.0
1147 "transgrp" ; artistic2.0 for data,
1148 ; gpl2 or gpl3 for code
1149 ;; Recommended package.
1151 ;; Optional packages, searched for at start,
1152 ;; and their depedencies.
1156 "ctbllib" ; gpl3+, clarified in the next release;
1158 ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
1171 (build-system gnu-build-system)
1174 ("readline" ,readline)
1177 `(#:modules ((ice-9 ftw)
1179 (guix build gnu-build-system)
1182 (modify-phases %standard-phases
1183 (add-after 'build 'build-packages
1184 ;; Compile all packages that have not been deleted by the
1185 ;; code snippet above.
1187 (setenv "CONFIG_SHELL" (which "bash"))
1188 (with-directory-excursion "pkg"
1189 (invoke "../bin/BuildPackages.sh")
1191 (add-after 'build-packages 'build-doc
1192 ;; The documentation is bundled, but we create it from source.
1194 (with-directory-excursion "doc"
1195 (invoke "./make_doc"))
1198 (lambda* (#:key outputs #:allow-other-keys)
1199 (let* ((out (assoc-ref outputs "out"))
1200 (bin (string-append out "/bin"))
1201 (prog (string-append bin "/gap"))
1202 (prog-real (string-append bin "/.gap-real"))
1203 (share (string-append out "/share/gap")))
1204 ;; Install only the gap binary; the gac compiler is left
1205 ;; for maybe later. "Wrap" it in a shell script that calls
1206 ;; the binary with the correct parameter.
1207 ;; The make target install-bin is supposed to do that, but
1208 ;; is not currently working.
1210 (copy-file "gap" prog-real)
1211 (call-with-output-file prog
1214 "#!~a~%exec ~a -l ~a \"$@\"~%"
1219 ;; Install the headers and library, which are needed by Sage.
1220 (invoke "make" "install-headers")
1221 (invoke "make" "install-libgap")
1222 ;; Remove information on the build directory from sysinfo.gap.
1223 (substitute* "sysinfo.gap"
1224 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1225 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1226 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1227 (invoke "make" "install-gaproot")
1228 ;; Copy the directory of compiled packages; the make target
1229 ;; install-pkg is currently empty.
1230 (copy-recursively "pkg" (string-append share "/pkg")))
1232 (home-page "https://www.gap-system.org/")
1234 "System for computational group theory")
1236 "GAP is a system for computational discrete algebra, with particular
1237 emphasis on computational group theory. It provides a programming language,
1238 a library of thousands of functions implementing algebraic algorithms
1239 written in the GAP language as well as large data libraries of algebraic
1241 ;; Some packages have different licenses (effectively forcing the
1242 ;; combined work to be licensed as gpl3+); if this is the case, this
1243 ;; is mentioned above next to their name.
1244 ;; Some packages have no license mentioned explicitly; supposedly this
1245 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1246 ;; safe side, we drop them for now.
1247 (license license:gpl2+)))
1249 (define-public givaro
1256 (url "https://github.com/linbox-team/givaro")
1257 (commit (string-append "v" version))))
1258 (file-name (git-file-name name version))
1261 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1262 (build-system gnu-build-system)
1264 `(("autoconf" ,autoconf)
1265 ("automake" ,automake)
1266 ("libtool" ,libtool)))
1268 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1269 (synopsis "Algebraic computations with exact rings and fields")
1271 "Givaro is a C++ library implementing the basic arithmetic of various
1272 algebraic objects: prime fields, extension fields, finite fields, finite
1273 rings, polynomials, algebraic numbers, arbitrary precision integers and
1274 rationals (C++ wrappers over gmp), fixed precision integers. It also
1275 provides data-structures and templated classes for the manipulation of
1276 compound objects, such as vectors, matrices and univariate polynomials.")
1277 (license license:cecill-b)
1278 (home-page "https://github.com/linbox-team/givaro")))
1280 (define-public fflas-ffpack
1282 (name "fflas-ffpack")
1287 (url "https://github.com/linbox-team/fflas-ffpack")
1289 (file-name (git-file-name name version))
1292 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1293 (build-system gnu-build-system)
1295 `(("autoconf" ,autoconf)
1296 ("automake" ,automake)
1297 ("libtool" ,libtool)
1298 ("pkg-config" ,pkg-config)))
1300 `(("openblas" ,openblas)))
1302 `(("givaro" ,givaro))) ; required according to the .pc file
1305 (list (string-append "--with-blas-libs="
1306 (assoc-ref %build-inputs "openblas")
1307 "/lib/libopenblas.so"))))
1308 (synopsis "C++ library for linear algebra over finite fields")
1310 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1311 operations over a finite field.
1312 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1313 of a subset of routines of the numerical BLAS; it also supports sparse
1314 matrix-vector products.
1315 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1316 library to provide functionalities of higher level, using the kernel
1317 of a BLAS. Additionally, it provides routines specific to exact linear
1318 algebra, such as the row echelon form.")
1319 (license license:lgpl2.1+)
1320 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1322 (define-public linbox
1329 (url "https://github.com/linbox-team/linbox")
1330 (commit (string-append "v" version))))
1331 (file-name (git-file-name name version))
1334 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
1335 (patches (search-patches "linbox-fix-pkgconfig.patch"))))
1336 (build-system gnu-build-system)
1338 `(("autoconf" ,autoconf)
1339 ("automake" ,automake)
1340 ("libtool" ,libtool)
1341 ("pkg-config" ,pkg-config)))
1343 `(("fflas-ffpack" ,fflas-ffpack)))
1344 (synopsis "C++ library for linear algebra over exact rings")
1346 "LinBox is a C++ template library for exact linear algebra computation
1347 with dense, sparse, and structured matrices over the integers and over
1349 (license license:lgpl2.1+)
1350 (home-page "https://linbox-team.github.io/linbox/")))
1355 (version "20140914")
1359 (url "https://bitbucket.org/malb/m4ri")
1360 (commit (string-append "release-" version))))
1361 (file-name (git-file-name name version))
1364 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1365 (build-system gnu-build-system)
1367 `(("autoconf" ,autoconf)
1368 ("automake" ,automake)
1369 ("libtool" ,libtool)
1370 ("pkg-config" ,pkg-config)))
1372 `(("libpng" ,libpng)))
1373 (synopsis "Arithmetic of dense matrices over F_2")
1374 (description "M4RI is a library for fast arithmetic with dense matrices
1375 over F2. The name M4RI comes from the first implemented algorithm: The
1376 Method of the Four Russians inversion algorithm published by Gregory Bard.
1377 This algorithm in turn is named after the Method of the Four Russians
1378 multiplication algorithm.")
1379 (license license:gpl2+)
1380 (home-page "https://bitbucket.org/malb/m4ri/")))
1382 (define-public symmetrica
1387 (method url-fetch/tarbomb)
1388 (uri (let ((v (string-join (string-split version #\.) "_")))
1389 (string-append "http://www.algorithm.uni-bayreuth.de/"
1390 "en/research/SYMMETRICA/"
1391 "SYM" v "_tar.gz")))
1394 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1395 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1396 (patches (search-patches "symmetrica-bruch.patch"
1397 "symmetrica-int32.patch"
1398 "symmetrica-return_values.patch"
1399 "symmetrica-sort_sum_rename.patch"))))
1400 (build-system gnu-build-system)
1402 `(#:tests? #f ;no test
1404 (modify-phases %standard-phases
1405 (add-after 'unpack 'fix-makefile
1407 (substitute* "makefile"
1408 (("cc -c") "gcc -c -fPIC"))
1410 (add-after 'fix-makefile 'turn-off-banner
1413 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1415 (delete 'configure) ;no configure script
1416 (replace 'install ;no install target
1417 (lambda* (#:key outputs #:allow-other-keys)
1418 (let* ((out (assoc-ref outputs "out"))
1419 (lib (string-append out "/lib"))
1420 (inc (string-append out "/include/symmetrica"))
1421 (doc (string-append out "/share/doc/symmetrica-" ,version))
1422 (static "libsymmetrica.a"))
1423 ;; Build static library.
1424 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1425 (invoke "ranlib" static)
1426 ;; Install static library and headers.
1427 (for-each (lambda (f) (install-file f inc))
1428 (find-files "." "\\.h$"))
1429 (install-file "libsymmetrica.a" lib)
1430 ;; Install documentation.
1431 (for-each (lambda (f) (install-file f doc))
1432 (find-files "." "\\.doc$"))
1434 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1435 (synopsis "Combinatoric C Library")
1436 (description "Symmetrica is a library for combinatorics. It has support
1437 for the representation theory of the symmetric group and related groups,
1438 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1439 polynomials, and the representation theory of Hecke algebras of type A_n.")
1440 (license license:public-domain)))
1442 (define-public m4rie
1445 (version "20150908")
1449 (url "https://bitbucket.org/malb/m4rie")
1450 (commit (string-append "release-" version))))
1451 (file-name (git-file-name name version))
1454 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1455 (build-system gnu-build-system)
1457 `(("autoconf" ,autoconf)
1458 ("automake" ,automake)
1459 ("libtool" ,libtool)))
1462 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1463 (description "M4RI is a library for fast arithmetic with dense matrices
1464 over finite fields of characteristic 2. So it extends the functionality
1465 of M4RI from F_2 to F_{2^e}.")
1466 (license license:gpl2+)
1467 (home-page "https://bitbucket.org/malb/m4rie/")))
1469 (define-public eclib
1472 (version "20190909")
1476 (url "https://github.com/JohnCremona/eclib/")
1477 (commit (string-append "v" version))))
1478 (file-name (git-file-name name version))
1481 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1482 (build-system gnu-build-system)
1484 `(("autoconf" ,autoconf)
1485 ("automake" ,automake)
1486 ("libtool" ,libtool)))
1489 ("pari-gp" ,pari-gp)))
1490 (synopsis "Ranks of elliptic curves and modular symbols")
1491 (description "The eclib package includes mwrank (for 2-descent on
1492 elliptic curves over Q) and modular symbol code; it has been written by
1493 John Cremona to compute his elliptic curve database.")
1494 (license license:gpl2+)
1495 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1496 "J.E.Cremona/mwrank/index.html"))))
1498 (define-public lrcalc
1505 (url "https://bitbucket.org/asbuch/lrcalc")
1506 (commit (string-append "lrcalc-" version))))
1507 (file-name (git-file-name name version))
1510 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1511 (patches (search-patches "lrcalc-includes.patch"))))
1512 (build-system gnu-build-system)
1514 `(("autoconf" ,autoconf)
1515 ("automake" ,automake)
1516 ("libtool" ,libtool)))
1519 (modify-phases %standard-phases
1520 (add-before 'build 'fix-permission
1522 (chmod "lrcalc.maple.src" #o644)
1524 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1525 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1526 program designed to compute Littlewood-Richardson coefficients. It computes
1527 single Littlewood-Richardson coefficients, products of Schur functions, or
1528 skew Schur functions. In addition it computes products in the small quantum
1529 cohomology ring of a Grassmann variety. The software package also includes
1530 a program that performs fast computation of the more general multiplicative
1531 structure constants of Schubert polynomials.")
1532 (license license:gpl2+)
1533 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1542 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1543 version ".tar.bz2"))
1546 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1547 (build-system gnu-build-system)
1550 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1551 ; mentions ATLAS in particular
1556 (string-append "--with-gmp-include="
1557 (assoc-ref %build-inputs "gmp") "/include")
1558 (string-append "--with-gmp-lib="
1559 (assoc-ref %build-inputs "gmp") "/lib")
1560 "--with-cblas=-lopenblas"
1561 (string-append "--with-cblas-include="
1562 (assoc-ref %build-inputs "cblas") "/include")
1563 (string-append "--with-cblas-lib="
1564 (assoc-ref %build-inputs "cblas") "/lib"))))
1565 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1567 "Solver for systems of linear equations over the integers")
1569 "IML is a C library implementing algorithms for computing exact
1570 solutions to dense systems of linear equations over the integers.
1571 Currently, IML provides the following functionality:
1574 @item Nonsingular rational system solving:
1575 compute the unique rational solution X to the system AX=B, where A and B
1576 are integer matrices, A nonsingular.
1577 @item Compute the right nullspace or kernel of an integer matrix.
1578 @item Certified linear system solving:
1579 compute a minimal denominator solution x to a system Ax=b, where b is an
1580 integer vector and A is an integer matrix with arbitrary shape and
1584 In addition, IML provides some low level routines for a variety of mod p
1585 matrix operations: computing the row-echelon form, determinant, rank
1586 profile, and inverse of a mod p matrix. These mod p routines are not
1587 general purpose; they require that p satisfy some preconditions based on
1588 the dimension of the input matrix (usually p should be prime and should be
1589 no more than about 20 bits long).")
1590 (license license:bsd-3)))