1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017, 2019 Eric Bavier <bavier@member.fsf.org>
11 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
12 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
13 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
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 perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages pulseaudio)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages python-xyz)
56 #:use-module (gnu packages readline)
57 #:use-module (gnu packages shells)
58 #:use-module (gnu packages tex)
59 #:use-module (gnu packages texinfo)
60 #:use-module (gnu packages xiph)
61 #:use-module (gnu packages xorg)
62 #:use-module (guix build-system ant)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system cmake)
65 #:use-module (guix build-system python)
66 #:use-module (guix download)
67 #:use-module (guix git-download)
68 #:use-module (guix hg-download)
69 #:use-module ((guix licenses) #:prefix license:)
70 #:use-module (guix packages)
71 #:use-module (guix utils))
81 "http://www.multiprecision.org/downloads/mpfrcx-"
85 "1s968480ymv6w0rnvfp9mxvx98hvi29fkvw8nk4ggzc6azxgwybs"))))
86 (build-system gnu-build-system)
90 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
91 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
93 "Mpfrcx is a library for the arithmetic of univariate polynomials over
94 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
95 on the rounding. For the time being, only the few functions needed to
96 implement the floating point approach to complex multiplication are
97 implemented. On the other hand, these comprise asymptotically fast
98 multiplication routines such as Toom–Cook and the FFT.")
99 (license license:lgpl3+)
100 (home-page "http://www.multiprecision.org/mpfrcx/")))
109 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
113 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
114 (build-system gnu-build-system)
115 (synopsis "Arithmetic of polynomials over binary finite fields")
117 "The gf2x library provides arithmetic of polynomials over finite fields
118 of characteristic 2. It implements the multiplication, squaring and
119 greatest common divisor operations.")
120 (license license:gpl3+)
121 (home-page "https://gforge.inria.fr/projects/gf2x/")))
130 "http://www.multiprecision.org/cm/download/cm-"
134 "1nf5kr0nqmhbzrsrinky18z0ighjpsmb5cr8zyg8jf04bfbyrfmc"))))
135 (build-system gnu-build-system)
138 ("zlib" ,zlib))) ; Header files included from cm_common.h.
140 `(("pari-gp" ,pari-gp)))
141 (synopsis "CM constructions for elliptic curves")
143 "The CM software implements the construction of ring class fields of
144 imaginary quadratic number fields and of elliptic curves with complex
145 multiplication via floating point approximations. It consists of libraries
146 that can be called from within a C program and of executable command
148 (license license:gpl3+)
149 (home-page "http://www.multiprecision.org/cm/")))
158 (url "https://github.com/fplll/fplll")
160 (file-name (git-file-name name version))
163 "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg"))))
164 (build-system gnu-build-system)
166 `(("autoconf" ,autoconf)
167 ("automake" ,automake)
168 ("libtool" ,libtool)))
172 (home-page "https://github.com/fplll/fplll")
173 (synopsis "Library for LLL-reduction of euclidean lattices")
175 "fplll contains implementations of several lattice algorithms.
176 The implementation relies on floating-point orthogonalization, and LLL
177 is central to the code, hence the name.
179 It includes implementations of floating-point LLL reduction
180 algorithms, offering different speed/guarantees ratios. It contains
181 a @emph{wrapper} choosing the estimated best sequence of variants in
182 order to provide a guaranteed output as fast as possible. In the case
183 of the wrapper, the succession of variants is oblivious to the user.
185 It includes an implementation of the BKZ reduction algorithm,
186 including the BKZ-2.0 improvements (extreme enumeration
187 pruning, pre-processing of blocks, early termination). Additionally,
188 Slide reduction and self dual BKZ are supported.
190 It also includes a floating-point implementation of the
191 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
192 vector. For the same task, the GaussSieve algorithm is also available
193 in fplll. Finally, it contains a variant of the enumeration algorithm
194 that computes a lattice vector closest to a given vector belonging to
195 the real span of the lattice.")
196 (license license:lgpl2.1+)))
198 (define-public python-fpylll
200 (name "python-fpylll")
204 ;; Pypi contains and older release, so we use a tagged release from
208 (url "https://github.com/fplll/fpylll")
209 (commit (string-append version "dev"))))
210 (file-name (git-file-name name version))
213 "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w"))))
214 (build-system python-build-system)
219 ("pari-gp" ,pari-gp)))
221 `(("cysignals" ,python-cysignals)
222 ("cython" ,python-cython)
223 ("flake8" ,python-flake8)
224 ("numpy" ,python-numpy)
225 ("pytest" ,python-pytest)))
226 (home-page "https://github.com/fplll/fpylll")
227 (synopsis "Python interface for fplll")
228 (description "fpylll is a Python wrapper for fplll.")
229 (license license:gpl2+)))
231 (define-public pari-gp
238 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
242 "070bjw4kg7r6lqs1hfs08n5fmjv90cpwflp3wr04hbrmyz28zj5z"))))
243 (build-system gnu-build-system)
245 `(("texlive" ,(texlive-union
246 (list texlive-amsfonts)))))
247 (inputs `(("gmp" ,gmp)
250 ("readline" ,readline)))
252 '(#:make-flags '("all")
253 #:test-target "dobench"
255 (modify-phases %standard-phases
257 (lambda* (#:key outputs #:allow-other-keys)
258 (invoke "./Configure"
259 (string-append "--prefix="
260 (assoc-ref outputs "out"))))))))
261 (synopsis "PARI/GP, a computer algebra system for number theory")
263 "PARI/GP is a widely used computer algebra system designed for fast
264 computations in number theory (factorisations, algebraic number theory,
265 elliptic curves...), but it also contains a large number of other useful
266 functions to compute with mathematical entities such as matrices,
267 polynomials, power series, algebraic numbers, etc., and a lot of
268 transcendental functions.
269 PARI is also available as a C library to allow for faster computations.")
270 (license license:gpl2+)
271 (home-page "https://pari.math.u-bordeaux.fr/")))
276 (version "0.0.11pl3")
280 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
284 "0yymbrgyjw500hqgmkj5m4nmscd7c9rs9w2c96lxgrcyab8krhrm"))))
285 (build-system gnu-build-system)
286 (native-inputs `(("perl" ,perl)))
287 (inputs `(("pari-gp" ,pari-gp)))
290 (list (string-append "--with-paricfg="
291 (assoc-ref %build-inputs "pari-gp")
292 "/lib/pari/pari.cfg"))))
293 (synopsis "PARI/GP, a computer algebra system for number theory")
295 "PARI/GP is a widely used computer algebra system designed for fast
296 computations in number theory (factorisations, algebraic number theory,
297 elliptic curves...), but it also contains a large number of other useful
298 functions to compute with mathematical entities such as matrices,
299 polynomials, power series, algebraic numbers, etc., and a lot of
300 transcendental functions.
301 PARI is also available as a C library to allow for faster computations.
303 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
304 (license license:gpl2)
305 (home-page "https://pari.math.u-bordeaux.fr/")))
316 "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
319 (base32 "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))))
328 "https://gforge.inria.fr/frs/download.php/33497/cmh-"
332 "1a28xr9bs0igms0ik99x0w8lnb0jyfcmvyi26pbyh9ggcdivd33p"))))
333 (build-system gnu-build-system)
339 ("fplll" ,fplll-4-cmh)
340 ("pari-gp" ,pari-gp)))
341 (synopsis "Igusa class polynomial computations")
343 "The CMH software computes Igusa (genus 2) class polynomials, which
344 parameterize the CM points in the moduli space of 2-dimensional abelian
345 varieties, i.e. Jacobians of hyperelliptic curves.
346 It can also be used to compute theta constants at arbitrary
348 (license license:gpl3+)
349 (home-page "http://cmh.gforge.inria.fr/")))
358 ;; "~parisse/giac" is not used because the maintainer regularly
359 ;; overwrites the release tarball there, introducing a checksum
360 ;; mismatch every time. See
361 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
362 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
363 "~parisse/debian/dists/stable/main/source/"
364 "giac_" version ".tar.gz"))
366 (base32 "1pvgp137zcl0rbhdn1j41xxfml7fp771a7x4ph8qrhhlx0hxzn3p"))))
367 (build-system gnu-build-system)
369 `(#:modules ((ice-9 ftw)
371 (guix build gnu-build-system))
373 (modify-phases %standard-phases
374 (add-after 'unpack 'patch-bin-cp
375 ;; Some Makefiles contain hard-coded "/bin/cp".
377 (substitute* (find-files "doc" "^Makefile")
378 (("/bin/cp") (which "cp")))
380 (add-after 'unpack 'disable-failing-test
381 ;; FIXME: Test failing. Not sure why.
383 (substitute* "check/Makefile.in"
386 (add-after 'install 'fix-doc
387 (lambda* (#:key outputs #:allow-other-keys)
388 (let ((out (assoc-ref outputs "out")))
389 ;; Most French documentation has a non-commercial
390 ;; license, so we need to remove it.
391 (with-directory-excursion (string-append out "/share/giac/doc/fr")
392 (for-each delete-file-recursively
393 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
395 ;; Remove duplicate documentation in
396 ;; "%out/share/doc/giac/", where Xcas does not expect
398 (delete-file-recursively (string-append out "/share/doc/giac"))
400 (add-after 'install 'remove-unnecessary-executable
401 (lambda* (#:key outputs #:allow-other-keys)
402 (let ((out (assoc-ref outputs "out")))
403 (delete-file (string-append out "/bin/xcasnew"))
406 ;;; TODO: Add libnauty.
413 ("libjpeg" ,libjpeg-turbo)
415 ("libsamplerate" ,libsamplerate)
417 ("libxinerama" ,libxinerama)
430 ("readline" ,readline)
431 ("texlive" ,texlive-tiny)))
432 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
433 (synopsis "Computer algebra system")
435 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
436 maple, mupad and the TI89. It is available as a standalone program (graphic
437 or text interfaces) or as a C++ library.")
438 (license license:gpl3+)))
447 "http://flintlib.org/flint-"
450 "0h08a71kn8347zsqjamqnmrxjpsnnzpmhvxb6d2xmfrcs6nyv2ch"))))
451 (build-system gnu-build-system)
456 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
458 `(#:parallel-tests? #f ; seems to be necessary on arm
460 (modify-phases %standard-phases
461 (add-before 'configure 'newer-c++
463 (substitute* "configure"
467 (lambda* (#:key inputs outputs #:allow-other-keys)
468 (let ((out (assoc-ref outputs "out"))
469 (gmp (assoc-ref inputs "gmp"))
470 (mpfr (assoc-ref inputs "mpfr"))
471 (ntl (assoc-ref inputs "ntl")))
472 ;; do not pass "--enable-fast-install", which makes the
473 ;; homebrew configure process fail
474 (invoke "./configure"
475 (string-append "--prefix=" out)
476 (string-append "--with-gmp=" gmp)
477 (string-append "--with-mpfr=" mpfr)
478 (string-append "--with-ntl=" ntl))
480 (synopsis "Fast library for number theory")
482 "FLINT is a C library for number theory. It supports arithmetic
483 with numbers, polynomials, power series and matrices over many base
484 rings, including multiprecision integers and rationals, integers
485 modulo n, p-adic numbers, finite fields (prime and non-prime order)
486 and real and complex numbers (via the Arb extension library).
488 Operations that can be performed include conversions, arithmetic,
489 GCDs, factoring, solving linear systems, and evaluating special
490 functions. In addition, FLINT provides various low-level routines for
492 (license license:gpl2+)
493 (home-page "http://flintlib.org/")))
502 (url "https://github.com/fredrik-johansson/arb")
504 (file-name (git-file-name name version))
507 "05lpy3hkl5f8ik19aw40cqydrb932xaf2n8hbq9ib5dnk7f010p1"))
508 (patches (search-patches "arb-flint-2.6.patch"))))
509 (build-system gnu-build-system)
511 `(("flint" ,flint))) ; flint.h is included by arf.h
517 (modify-phases %standard-phases
519 (lambda* (#:key inputs outputs #:allow-other-keys)
520 (let ((out (assoc-ref outputs "out"))
521 (flint (assoc-ref inputs "flint"))
522 (gmp (assoc-ref inputs "gmp"))
523 (mpfr (assoc-ref inputs "mpfr")))
524 ;; Do not pass "--enable-fast-install", which makes the
525 ;; homebrew configure process fail.
526 (invoke "./configure"
527 (string-append "--prefix=" out)
528 (string-append "--with-flint=" flint)
529 (string-append "--with-gmp=" gmp)
530 (string-append "--with-mpfr=" mpfr))))))))
531 (synopsis "Arbitrary precision floating-point ball arithmetic")
533 "Arb is a C library for arbitrary-precision floating-point ball
534 arithmetic. It supports efficient high-precision computation with
535 polynomials, power series, matrices and special functions over the
536 real and complex numbers, with automatic, rigorous error control.")
537 (license license:lgpl2.1+)
538 (home-page "http://arblib.org")))
540 (define-public python-flint
542 (name "python-flint")
547 (url "https://github.com/fredrik-johansson/python-flint")
549 (file-name (git-file-name name version))
552 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
553 (patches (search-patches "python-flint-includes.patch"))))
554 (build-system python-build-system)
556 `(("python-cython" ,python-cython)))
558 `(("python-numpy" ,python-numpy)))
562 (synopsis "Python module wrapping ARB and FLINT")
564 "Python-flint is a Python extension module wrapping FLINT
565 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
566 arithmetic). It supports integers, rationals, modular integers,
567 real and complex ball arithmetic, polynomials and matrices over all
568 these types and other mathematical functions.")
569 (license license:expat)
570 (home-page "http://fredrikj.net/python-flint/")))
578 (uri (string-append "https://shoup.net/ntl/ntl-"
582 "1lisp3064rch3jaa2wrhy1s9kll7i3ka3d0y6lj6l3l4ckfcrhdp"))
583 (modules '((guix build utils)))
586 (delete-file-recursively "src/libtool-origin")
588 (build-system gnu-build-system)
590 `(("libtool" ,libtool)
591 ("perl" ,perl))) ; for configuration
597 (modify-phases %standard-phases
599 (lambda* (#:key inputs outputs #:allow-other-keys)
601 (invoke "./configure"
602 (string-append "PREFIX=" (assoc-ref outputs "out"))
603 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
604 ;; set the library prefixes explicitly so that they get
605 ;; embedded in the .la file
606 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
607 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
608 ;; Do not build especially for the build machine.
612 (synopsis "C++ library for number theory")
614 "NTL is a C++ library providing data structures and algorithms
615 for manipulating signed, arbitrary length integers, and for vectors,
616 matrices, and polynomials over the integers and over finite fields.")
617 (license license:gpl2+)
618 (home-page "https://shoup.net/ntl/")))
620 (define-public singular
628 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
632 (string-trim-right version #\p
633 0 (1- (string-length version)))
635 "/singular-" version ".tar.gz"))
637 "1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
638 (build-system gnu-build-system)
640 `(("doxygen" ,doxygen)
641 ("graphviz" ,graphviz)
650 ("readline" ,readline)))
653 (list (string-append "--with-ntl="
654 (assoc-ref %build-inputs "ntl")))))
655 (synopsis "Computer algebra system for polynomial computations")
657 "Singular is a computer algebra system for polynomial computations,
658 with special emphasis on commutative and non-commutative algebra, algebraic
659 geometry and singularity theory.")
660 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
661 ;; libraries with which it links are licensed under lgpl3+, so the
662 ;; combined work becomes gpl3. See COPYING in the source code.
663 (license license:gpl3)
664 (home-page "http://www.singular.uni-kl.de/index.php")))
666 (define-public gmp-ecm
672 ;; Use the ‘Latest version’ link for a stable URI across releases.
673 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
674 "latestfile/160/ecm-" version ".tar.gz"))
676 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
677 (build-system gnu-build-system)
681 `(#:configure-flags '("--enable-shared"
682 ;; Disable specific assembly routines, which depend
683 ;; on the subarchitecture of the build machine,
684 ;; and use gmp instead.
685 "--disable-asm-redc")))
686 (synopsis "Integer factorization library using the elliptic curve method")
688 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
689 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
691 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
692 ;; so the combined work is under gpl3+.
693 (license license:gpl3+)
694 (home-page "http://ecm.gforge.inria.fr/")))
702 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
705 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
706 (patches (search-patches "bc-fix-cross-compilation.patch"))))
707 (build-system gnu-build-system)
709 `(("automake" ,automake)
710 ("autoconf" ,autoconf)
713 ("texinfo" ,texinfo)))
716 (list "--with-readline")
718 (modify-phases %standard-phases
719 (add-after 'unpack 'autogen
721 (invoke "autoreconf" "-vif"))))))
722 (home-page "https://www.gnu.org/software/bc/")
723 (synopsis "Arbitrary precision numeric processing language")
725 "bc is an arbitrary precision numeric processing language. It includes
726 an interactive environment for evaluating mathematical statements. Its
727 syntax is similar to that of C, so basic usage is familiar. It also includes
728 \"dc\", a reverse-polish calculator.")
729 (license license:gpl2+)))
731 ;; The original kiss-fft does not have a complete build system and does not
732 ;; build any shared libraries. This is a fork used by Extempore.
733 (define-public kiss-fft-for-extempore
735 (name "kiss-fft-for-extempore")
740 (url "https://github.com/extemporelang/kiss_fft")
742 (file-name (git-file-name name version))
745 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
746 (build-system cmake-build-system)
747 (arguments `(#:tests? #f)) ; no tests included
748 ;; Extempore refuses to build on architectures other than x86_64
749 (supported-systems '("x86_64-linux"))
750 (home-page "https://github.com/extemporelang/kiss_fft")
751 (synopsis "Mixed-radix Fast Fourier Transform")
753 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
754 that can use fixed or floating data types and can easily be incorporated into
756 (license license:bsd-3)))
764 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
768 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
769 (build-system gnu-build-system)
772 '("--enable-shared" "--enable-openmp" "--enable-threads"
773 ,@(let ((system (or (%current-target-system) (%current-system))))
774 ;; Enable SIMD extensions for codelets. See details at:
775 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
777 ((string-prefix? "x86_64" system)
778 '("--enable-sse2" "--enable-avx" "--enable-avx2"
779 "--enable-avx512" "--enable-avx-128-fma"))
780 ((string-prefix? "i686" system)
782 ((string-prefix? "aarch64" system)
783 ;; Note that fftw supports NEON on 32-bit ARM only when
784 ;; compiled for single-precision.
788 ;; By default '-mtune=native' is used. However, that may cause the
789 ;; use of ISA extensions (e.g. AVX) that are not necessarily
790 ;; available on the user's machine when that package is built on a
791 ;; different machine.
792 "ax_cv_c_flags__mtune_native=no")))
793 (native-inputs `(("perl" ,perl)))
794 (home-page "http://fftw.org")
795 (synopsis "Computing the discrete Fourier transform")
797 "FFTW is a C subroutine library for computing the discrete Fourier
798 transform (DFT) in one or more dimensions, of arbitrary input size, and of
799 both real and complex data (as well as of even/odd data---i.e. the discrete
800 cosine/ sine transforms or DCT/DST).")
801 (license license:gpl2+)))
804 (package (inherit fftw)
807 (substitute-keyword-arguments (package-arguments fftw)
808 ((#:configure-flags fftw-configure-flags)
809 `(cons* "--enable-single"
810 ,@(if (string-prefix? "arm" (or (%current-target-system)
812 ;; fftw supports NEON on 32-bit ARM only when compiled
813 ;; for single-precision, so add it here.
816 ,fftw-configure-flags))))
818 (string-append (package-description fftw)
819 " Single-precision version."))))
821 (define-public fftw-openmpi
822 (package (inherit fftw)
823 (name "fftw-openmpi")
825 `(("openmpi" ,openmpi)
826 ,@(package-inputs fftw)))
828 (substitute-keyword-arguments (package-arguments fftw)
829 ((#:configure-flags cf)
830 `(cons "--enable-mpi" ,cf))
831 ((#:phases phases '%standard-phases)
832 `(modify-phases ,phases
833 (add-before 'check 'mpi-setup
836 (string-append (package-description fftw)
837 " With OpenMPI parallelism support."))))
839 (define-public java-la4j
846 (url "https://github.com/vkostyukov/la4j")
848 (file-name (string-append name "-" version "-checkout"))
851 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
852 (build-system ant-build-system)
854 `(#:jar-name "la4j.jar"
856 #:test-exclude (list "**/Abstract*.java"
858 "**/DenseMatrixTest.java"
859 "**/SparseMatrixTest.java"
861 "**/SparseVectorTest.java"
862 "**/DenseVectorTest.java")))
864 `(("java-junit" ,java-junit)
865 ("java-hamcrest-core" ,java-hamcrest-core)))
866 (home-page "http://la4j.org/")
867 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
868 (description "The la4j library is a Java library that provides Linear
869 Algebra primitives (matrices and vectors) and algorithms. The key features of
870 the la4j library are:
873 @item No dependencies and tiny size
874 @item Fluent object-oriented/functional API
875 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
876 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
877 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
878 @item MatrixMarket/CSV IO formats support for matrices and vectors
880 (license license:asl2.0)))
882 (define-public java-jlargearrays
884 (name "java-jlargearrays")
888 (uri (string-append "https://repo1.maven.org/maven2/"
889 "pl/edu/icm/JLargeArrays/"
890 version "/JLargeArrays-" version
892 (file-name (string-append name "-" version ".jar"))
895 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
896 (build-system ant-build-system)
898 `(#:jar-name "jlargearrays.jar"
899 #:tests? #f ; tests are not included in the release archive
902 `(("java-commons-math3" ,java-commons-math3)))
903 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
904 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
905 (description "JLargeArrays is a Java library of one-dimensional arrays
906 that can store up to 263 elements.")
907 (license license:bsd-2)))
909 (define-public java-jtransforms
911 (name "java-jtransforms")
915 (uri (string-append "https://repo1.maven.org/maven2/"
916 "com/github/wendykierp/JTransforms/"
917 version "/JTransforms-" version "-sources.jar"))
920 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
921 (build-system ant-build-system)
923 `(#:jar-name "jtransforms.jar"
924 #:tests? #f ; tests are not included in the release archive
927 `(("java-commons-math3" ,java-commons-math3)
928 ("java-jlargearrays" ,java-jlargearrays)))
929 (home-page "https://github.com/wendykierp/JTransforms")
930 (synopsis "Multithreaded FFT library written in pure Java")
931 (description "JTransforms is a multithreaded FFT library written in pure
932 Java. Currently, four types of transforms are available: @dfn{Discrete
933 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
934 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
935 (license license:bsd-2)))
944 (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
945 (commit (string-append "v" version))))
946 (file-name (git-file-name name version))
949 "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
950 (build-system cmake-build-system)
952 `(("perl" ,perl))) ; for pod2man
953 (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
954 (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
955 (description "lmfit is a C library for Levenberg-Marquardt least-squares
956 minimization and curve fitting. It is mature code, based on decades-old
957 algorithms from the FORTRAN library MINPACK.")
958 (license license:bsd-2)))
960 (define-public symengine
968 (url "https://github.com/symengine/symengine")
969 (commit (string-append "v" version))))
970 (file-name (git-file-name name version))
972 (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
973 (build-system cmake-build-system)
976 ;; These are the suggested build options in the README.
977 '("-DCMAKE_BUILD_TYPE=Release"
981 "-DINTEGER_CLASS=flint"
983 "-DWITH_SYMENGINE_THREAD_SAFE=on"
984 "-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
992 (home-page "https://github.com/symengine/symengine")
993 (synopsis "Fast symbolic manipulation library")
995 "SymEngine is a standalone fast C++ symbolic manipulation library.
996 Optional thin wrappers allow usage of the library from other languages.")
997 (license (list license:expat ;SymEngine
998 license:bsd-3)))) ;3rd party code
1000 (define-public eigen
1006 (uri (string-append "https://bitbucket.org/eigen/eigen/get/"
1007 version ".tar.bz2"))
1010 "1km3fyfzyqfdvmnl79drps3fjwnz3zbh0c7l34mfbqyvvs8cy4wz"))
1011 (file-name (string-append name "-" version ".tar.bz2"))
1012 (patches (search-patches "eigen-stabilise-sparseqr-test.patch"))
1013 (modules '((guix build utils)))
1015 ;; There are 3 test failures in the "unsupported" directory,
1016 ;; but maintainers say it's a known issue and it's unsupported
1017 ;; anyway, so just skip them.
1019 (substitute* "unsupported/CMakeLists.txt"
1020 (("add_subdirectory\\(test.*")
1021 "# Do not build the tests for unsupported features.\n"))
1023 (build-system cmake-build-system)
1025 '(;; Turn off debugging symbols to save space.
1026 #:build-type "Release"
1028 #:phases (modify-phases %standard-phases
1031 (let* ((cores (parallel-job-count))
1032 (dash-j (format #f "-j~a" cores)))
1033 (setenv "EIGEN_SEED" "1") ;for reproducibility
1034 ;; First build the tests, in parallel. See
1035 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
1036 (invoke "make" "buildtests" dash-j)
1038 ;; Then run 'CTest' with -V so we get more
1039 ;; details upon failure.
1040 (invoke "ctest" "-V" dash-j)))))))
1041 (home-page "https://eigen.tuxfamily.org")
1042 (synopsis "C++ template library for linear algebra")
1044 "Eigen is a C++ template library for linear algebra: matrices, vectors,
1045 numerical solvers, and related algorithms. It provides an elegant API based
1046 on \"expression templates\". It is versatile: it supports all matrix sizes,
1047 all standard numeric types, various matrix decompositions and geometry
1048 features, and more.")
1050 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
1051 ;; See 'COPYING.README' for details.
1052 (license license:mpl2.0)))
1054 (define-public eigen-for-tensorflow
1055 (let ((changeset "fd6845384b86")
1057 (package (inherit eigen)
1058 (name "eigen-for-tensorflow")
1059 (version (string-append "3.3.5-" revision "." changeset))
1063 (url "https://bitbucket.org/eigen/eigen")
1064 (changeset changeset)))
1067 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
1068 (file-name (string-append name "-" version "-checkout"))
1069 (modules '((guix build utils)))
1071 ;; There are 3 test failures in the "unsupported" directory,
1072 ;; but maintainers say it's a known issue and it's unsupported
1073 ;; anyway, so just skip them.
1075 (substitute* "unsupported/CMakeLists.txt"
1076 (("add_subdirectory\\(test.*")
1077 "# Do not build the tests for unsupported features.\n"))
1080 (define-public xtensor
1087 (url "https://github.com/QuantStack/xtensor")
1091 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1092 (file-name (git-file-name name version))))
1093 (build-system cmake-build-system)
1095 `(("googletest" ,googletest)
1099 '("-DBUILD_TESTS=ON")
1100 #:test-target "xtest"))
1101 (home-page "https://quantstack.net/xtensor")
1102 (synopsis "C++ tensors with broadcasting and lazy computing")
1103 (description "xtensor is a C++ library meant for numerical analysis with
1104 multi-dimensional array expressions.
1108 @item an extensible expression system enabling lazy broadcasting.
1109 @item an API following the idioms of the C++ standard library.
1110 @item tools to manipulate array expressions and build upon xtensor.
1112 (license license:bsd-3)))
1121 (uri (string-append "https://www.gap-system.org/pub/gap/gap-"
1122 (version-major+minor version)
1127 (base32 "0cp6ddk0469zzv1m1vair6gm27ic6c5m77ri8rn0znq3gaps6x94"))
1128 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1131 ;; Delete the external gmp and zlib libraries
1132 ;; and a subdirectory not needed for our build.
1133 (for-each delete-file-recursively
1134 '("extern" "hpcgap"))
1135 ;; Delete a failing test.
1136 ;; FIXME: This might be fixed in the next release, see
1137 ;; https://github.com/gap-system/gap/issues/3292
1138 (delete-file "tst/testinstall/dir.tst")
1139 ;; Delete all packages except for a fixed list.
1140 (with-directory-excursion "pkg"
1141 (for-each delete-file-recursively
1142 (lset-difference string=? (scandir ".")
1144 ;; Necessary packages.
1147 "SmallGrp-1.3" ; artistic2.0
1148 "transgrp" ; artistic2.0 for data,
1149 ; gpl2 or gpl3 for code
1150 ;; Recommanded package.
1152 ;; Optional packages, searched for at start,
1153 ;; and their depedencies.
1156 "crisp-1.4.4" ; bsd-2
1157 "ctbllib" ; gpl3+ according to doc/chap0.txt
1160 "irredsol-1.4" ; bsd-2
1167 "tomlib-1.2.7" ; gpl2+, clarified in the git repository
1168 ; and the next release
1171 (build-system gnu-build-system)
1176 `(#:modules ((ice-9 ftw)
1178 (guix build gnu-build-system)
1181 (modify-phases %standard-phases
1182 (add-after 'build 'build-packages
1183 ;; Compile all packages that have not been deleted by the
1184 ;; code snippet above.
1186 (setenv "CONFIG_SHELL" (which "bash"))
1187 (with-directory-excursion "pkg"
1188 (invoke "../bin/BuildPackages.sh")
1190 (add-after 'build-packages 'build-doc
1191 ;; The documentation is bundled, but we create it from source.
1193 (with-directory-excursion "doc"
1194 (invoke "./make_doc"))
1197 (lambda* (#:key outputs #:allow-other-keys)
1198 (let* ((out (assoc-ref outputs "out"))
1199 (bin (string-append out "/bin"))
1200 (lib (string-append out "/lib"))
1201 (prog (string-append bin "/gap"))
1202 (prog-real (string-append bin "/.gap-real"))
1203 (share (string-append out "/share/gap"))
1204 (include (string-append out "/include/gap"))
1205 (include-hpc (string-append include "/hpc")))
1206 ;; Install only the gap binary; the gac compiler is left
1207 ;; for maybe later. "Wrap" it in a shell script that calls
1208 ;; the binary with the correct parameter.
1210 (copy-file "gap" prog-real)
1211 (call-with-output-file prog
1214 "#!~a~%exec ~a -l ~a \"$@\"~%"
1219 ;; Install the headers, which are needed by Sage. The
1220 ;; Makefile target "install-headers" was available in
1221 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1222 (mkdir-p include-hpc)
1223 (install-file "gen/config.h" include)
1224 (let ((file-name-predicate-without-stat
1226 (cut (file-name-predicate regex) <> #f))))
1227 (with-directory-excursion "src"
1229 (cut install-file <> include)
1231 (file-name-predicate-without-stat ".*\\.h$"))))
1232 (with-directory-excursion "src/hpc"
1234 (cut install-file <> include-hpc)
1236 (file-name-predicate-without-stat ".*\\.h$")))))
1237 ;; Install the library, which is needed by Sage. The
1238 ;; Makefile target "install-libgap" was available in
1239 ;; gap-4.10.0, but has been commented out in gap-4.10.1.
1240 ;; Compared to the Makefile, which used libtool, the
1241 ;; following approach of copying files and making symlinks
1242 ;; is rather pedestrian. There is hope that some later
1243 ;; version of gap reinstates and completes the install
1245 (invoke "make" "libgap.la")
1246 (install-file "libgap.la" lib)
1247 (install-file ".libs/libgap.so.0.0.0" lib)
1248 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so"))
1249 (symlink "libgap.so.0.0.0" (string-append lib "/libgap.so.0"))
1250 ;; Install a certain number of files and directories to
1251 ;; SHARE, where the wrapped shell script expects them.
1252 ;; Remove information on the build directory from sysinfo.gap.
1253 (substitute* "sysinfo.gap"
1254 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1255 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1256 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1257 (install-file "sysinfo.gap" share)
1258 (copy-recursively "grp" (string-append share "/grp"))
1259 (copy-recursively "pkg" (string-append share "/pkg"))
1260 ;; The following is not the C library libgap.so, but a
1261 ;; library of GAP code.
1262 (copy-recursively "lib" (string-append share "/lib"))
1263 ;; The gap binary looks for documentation inside SHARE.
1264 (copy-recursively "doc" (string-append share "/doc")))
1266 (home-page "https://www.gap-system.org/")
1268 "System for computational group theory")
1270 "GAP is a system for computational discrete algebra, with particular
1271 emphasis on computational group theory. It provides a programming language,
1272 a library of thousands of functions implementing algebraic algorithms
1273 written in the GAP language as well as large data libraries of algebraic
1275 ;; Some packages have different licenses (effectively forcing the
1276 ;; combined work to be licensed as gpl3+); if this is the case, this
1277 ;; is mentioned above next to their name.
1278 ;; Some packages have no license mentioned explicitly; supposedly this
1279 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1280 ;; safe side, we drop them for now.
1281 (license license:gpl2+)))
1283 (define-public givaro
1290 (url "https://github.com/linbox-team/givaro")
1291 (commit (string-append "v" version))))
1292 (file-name (git-file-name name version))
1295 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1296 (build-system gnu-build-system)
1298 `(("autoconf" ,autoconf)
1299 ("automake" ,automake)
1300 ("libtool" ,libtool)))
1302 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1303 (synopsis "Algebraic computations with exact rings and fields")
1305 "Givaro is a C++ library implementing the basic arithmetic of various
1306 algebraic objects: prime fields, extension fields, finite fields, finite
1307 rings, polynomials, algebraic numbers, arbitrary precision integers and
1308 rationals (C++ wrappers over gmp), fixed precision integers. It also
1309 provides data-structures and templated classes for the manipulation of
1310 compound objects, such as vectors, matrices and univariate polynomials.")
1311 (license license:cecill-b)
1312 (home-page "https://github.com/linbox-team/givaro")))
1314 (define-public fflas-ffpack
1316 (name "fflas-ffpack")
1321 (url "https://github.com/linbox-team/fflas-ffpack")
1323 (file-name (git-file-name name version))
1326 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1327 (build-system gnu-build-system)
1329 `(("autoconf" ,autoconf)
1330 ("automake" ,automake)
1331 ("libtool" ,libtool)
1332 ("pkg-config" ,pkg-config)))
1334 `(("openblas" ,openblas)))
1336 `(("givaro" ,givaro))) ; required according to the .pc file
1339 (list (string-append "--with-blas-libs="
1340 (assoc-ref %build-inputs "openblas")
1341 "/lib/libopenblas.so"))))
1342 (synopsis "C++ library for linear algebra over finite fields")
1344 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1345 operations over a finite field.
1346 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1347 of a subset of routines of the numerical BLAS; it also supports sparse
1348 matrix-vector products.
1349 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1350 library to provide functionalities of higher level, using the kernel
1351 of a BLAS. Additionally, it provides routines specific to exact linear
1352 algebra, such as the row echelon form.")
1353 (license license:lgpl2.1+)
1354 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1356 (define-public linbox
1363 (url "https://github.com/linbox-team/linbox")
1364 (commit (string-append "v" version))))
1365 (file-name (git-file-name name version))
1368 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
1369 (patches (search-patches "linbox-fix-pkgconfig.patch"))))
1370 (build-system gnu-build-system)
1372 `(("autoconf" ,autoconf)
1373 ("automake" ,automake)
1374 ("libtool" ,libtool)
1375 ("pkg-config" ,pkg-config)))
1377 `(("fflas-ffpack" ,fflas-ffpack)))
1378 (synopsis "C++ library for linear algebra over exact rings")
1380 "LinBox is a C++ template library for exact linear algebra computation
1381 with dense, sparse, and structured matrices over the integers and over
1383 (license license:lgpl2.1+)
1384 (home-page "https://linbox-team.github.io/linbox/")))
1389 (version "20140914")
1393 (url "https://bitbucket.org/malb/m4ri")
1394 (commit (string-append "release-" version))))
1395 (file-name (git-file-name name version))
1398 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1399 (build-system gnu-build-system)
1401 `(("autoconf" ,autoconf)
1402 ("automake" ,automake)
1403 ("libtool" ,libtool)
1404 ("pkg-config" ,pkg-config)))
1406 `(("libpng" ,libpng)))
1407 (synopsis "Arithmetic of dense matrices over F_2")
1408 (description "M4RI is a library for fast arithmetic with dense matrices
1409 over F2. The name M4RI comes from the first implemented algorithm: The
1410 Method of the Four Russians inversion algorithm published by Gregory Bard.
1411 This algorithm in turn is named after the Method of the Four Russians
1412 multiplication algorithm.")
1413 (license license:gpl2+)
1414 (home-page "https://bitbucket.org/malb/m4ri/")))
1416 (define-public symmetrica
1421 (method url-fetch/tarbomb)
1422 (uri (let ((v (string-join (string-split version #\.) "_")))
1423 (string-append "http://www.algorithm.uni-bayreuth.de/"
1424 "en/research/SYMMETRICA/"
1425 "SYM" v "_tar.gz")))
1428 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1429 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1430 (patches (search-patches "symmetrica-bruch.patch"
1431 "symmetrica-int32.patch"
1432 "symmetrica-return_values.patch"
1433 "symmetrica-sort_sum_rename.patch"))))
1434 (build-system gnu-build-system)
1436 `(#:tests? #f ;no test
1438 (modify-phases %standard-phases
1439 (add-after 'unpack 'fix-makefile
1441 (substitute* "makefile"
1442 (("cc -c") "gcc -c -fPIC"))
1444 (add-after 'fix-makefile 'turn-off-banner
1447 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1449 (delete 'configure) ;no configure script
1450 (replace 'install ;no install target
1451 (lambda* (#:key outputs #:allow-other-keys)
1452 (let* ((out (assoc-ref outputs "out"))
1453 (lib (string-append out "/lib"))
1454 (inc (string-append out "/include/symmetrica"))
1455 (doc (string-append out "/share/doc/symmetrica-" ,version))
1456 (static "libsymmetrica.a"))
1457 ;; Build static library.
1458 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1459 (invoke "ranlib" static)
1460 ;; Install static library and headers.
1461 (for-each (lambda (f) (install-file f inc))
1462 (find-files "." "\\.h$"))
1463 (install-file "libsymmetrica.a" lib)
1464 ;; Install documentation.
1465 (for-each (lambda (f) (install-file f doc))
1466 (find-files "." "\\.doc$"))
1468 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1469 (synopsis "Combinatoric C Library")
1470 (description "Symmetrica is a library for combinatorics. It has support
1471 for the representation theory of the symmetric group and related groups,
1472 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1473 polynomials, and the representation theory of Hecke algebras of type A_n.")
1474 (license license:public-domain)))
1476 (define-public m4rie
1479 (version "20150908")
1483 (url "https://bitbucket.org/malb/m4rie")
1484 (commit (string-append "release-" version))))
1485 (file-name (git-file-name name version))
1488 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1489 (build-system gnu-build-system)
1491 `(("autoconf" ,autoconf)
1492 ("automake" ,automake)
1493 ("libtool" ,libtool)))
1496 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1497 (description "M4RI is a library for fast arithmetic with dense matrices
1498 over finite fields of characteristic 2. So it extends the functionality
1499 of M4RI from F_2 to F_{2^e}.")
1500 (license license:gpl2+)
1501 (home-page "https://bitbucket.org/malb/m4rie/")))
1503 (define-public eclib
1506 (version "20190909")
1510 (url "https://github.com/JohnCremona/eclib/")
1511 (commit (string-append "v" version))))
1512 (file-name (git-file-name name version))
1515 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1516 (build-system gnu-build-system)
1518 `(("autoconf" ,autoconf)
1519 ("automake" ,automake)
1520 ("libtool" ,libtool)))
1523 ("pari-gp" ,pari-gp)))
1524 (synopsis "Ranks of elliptic curves and modular symbols")
1525 (description "The eclib package includes mwrank (for 2-descent on
1526 elliptic curves over Q) and modular symbol code; it has been written by
1527 John Cremona to compute his elliptic curve database.")
1528 (license license:gpl2+)
1529 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1530 "J.E.Cremona/mwrank/index.html"))))
1532 (define-public lrcalc
1539 (url "https://bitbucket.org/asbuch/lrcalc")
1540 (commit (string-append "lrcalc-" version))))
1541 (file-name (git-file-name name version))
1544 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1545 (patches (search-patches "lrcalc-includes.patch"))))
1546 (build-system gnu-build-system)
1548 `(("autoconf" ,autoconf)
1549 ("automake" ,automake)
1550 ("libtool" ,libtool)))
1553 (modify-phases %standard-phases
1554 (add-before 'build 'fix-permission
1556 (chmod "lrcalc.maple.src" #o644)
1558 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1559 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1560 program designed to compute Littlewood-Richardson coefficients. It computes
1561 single Littlewood-Richardson coefficients, products of Schur functions, or
1562 skew Schur functions. In addition it computes products in the small quantum
1563 cohomology ring of a Grassmann variety. The software package also includes
1564 a program that performs fast computation of the more general multiplicative
1565 structure constants of Schubert polynomials.")
1566 (license license:gpl2+)
1567 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1576 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1577 version ".tar.bz2"))
1580 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1581 (build-system gnu-build-system)
1584 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1585 ; mentions ATLAS in particular
1590 (string-append "--with-gmp-include="
1591 (assoc-ref %build-inputs "gmp") "/include")
1592 (string-append "--with-gmp-lib="
1593 (assoc-ref %build-inputs "gmp") "/lib")
1594 "--with-cblas=-lopenblas"
1595 (string-append "--with-cblas-include="
1596 (assoc-ref %build-inputs "cblas") "/include")
1597 (string-append "--with-cblas-lib="
1598 (assoc-ref %build-inputs "cblas") "/lib"))))
1599 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1601 "Solver for systems of linear equations over the integers")
1603 "IML is a C library implementing algorithms for computing exact
1604 solutions to dense systems of linear equations over the integers.
1605 Currently, IML provides the following functionality:
1608 @item Nonsingular rational system solving:
1609 compute the unique rational solution X to the system AX=B, where A and B
1610 are integer matrices, A nonsingular.
1611 @item Compute the right nullspace or kernel of an integer matrix.
1612 @item Certified linear system solving:
1613 compute a minimal denominator solution x to a system Ax=b, where b is an
1614 integer vector and A is an integer matrix with arbitrary shape and
1618 In addition, IML provides some low level routines for a variety of mod p
1619 matrix operations: computing the row-echelon form, determinant, rank
1620 profile, and inverse of a mod p matrix. These mod p routines are not
1621 general purpose; they require that p satisfy some preconditions based on
1622 the dimension of the input matrix (usually p should be prime and should be
1623 no more than about 20 bits long).")
1624 (license license:bsd-3)))