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–2021 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>
16 ;;; Copyright © 2021 Lars-Dominik Braun <ldb@leibniz-psychology.org>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages algebra)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages cpp)
40 #:use-module (gnu packages documentation)
41 #:use-module (gnu packages ed)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages fltk)
44 #:use-module (gnu packages gl)
45 #:use-module (gnu packages graphviz)
46 #:use-module (gnu packages image)
47 #:use-module (gnu packages java)
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 build-system r)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix hg-download)
71 #:use-module ((guix licenses) #:prefix license:)
72 #:use-module (guix packages)
73 #:use-module (guix utils))
83 "http://www.multiprecision.org/downloads/mpfrcx-"
87 "0gz5rma9al2jrifpknqkcnd9dkf8l05jcxy3s4ghwhd4y3h5dwia"))))
88 (build-system gnu-build-system)
92 ("mpc" ,mpc))) ; Header files are included by mpfrcx.h.
93 (synopsis "Arithmetic of polynomials over arbitrary precision numbers")
95 "Mpfrcx is a library for the arithmetic of univariate polynomials over
96 arbitrary precision real (mpfr) or complex (mpc) numbers, without control
97 on the rounding. For the time being, only the few functions needed to
98 implement the floating point approach to complex multiplication are
99 implemented. On the other hand, these comprise asymptotically fast
100 multiplication routines such as Toom–Cook and the FFT.")
101 (license license:lgpl3+)
102 (home-page "http://www.multiprecision.org/mpfrcx/")))
111 "https://gforge.inria.fr/frs/download.php/file/36934/gf2x-"
115 "0d6vh1mxskvv3bxl6byp7gxxw3zzpkldrxnyajhnl05m0gx7yhk1"))))
116 (build-system gnu-build-system)
117 (synopsis "Arithmetic of polynomials over binary finite fields")
119 "The gf2x library provides arithmetic of polynomials over finite fields
120 of characteristic 2. It implements the multiplication, squaring and
121 greatest common divisor operations.")
122 (license license:gpl3+)
123 (home-page "https://gforge.inria.fr/projects/gf2x/")))
132 "http://www.multiprecision.org/downloads/cm-"
136 "0qq6b1kwb1byj8ws33ya5awq0ilkpm32037pi1l4cf2737fg9m42"))))
137 (build-system gnu-build-system)
140 ("zlib" ,zlib))) ; Header files included from cm_common.h.
142 `(("pari-gp" ,pari-gp)))
143 (synopsis "CM constructions for elliptic curves")
145 "The CM software implements the construction of ring class fields of
146 imaginary quadratic number fields and of elliptic curves with complex
147 multiplication via floating point approximations. It consists of libraries
148 that can be called from within a C program and of executable command
150 (license license:gpl3+)
151 (home-page "http://www.multiprecision.org/cm/")))
160 (url "https://github.com/fplll/fplll")
162 (file-name (git-file-name name version))
165 "06nyfidagp8pc2kfcw88ldgb2b1xm0a8z31n0sln7j72ihlmd8zj"))
166 (patches (search-patches "fplll-std-fenv.patch"))))
167 (build-system gnu-build-system)
169 `(("autoconf" ,autoconf)
170 ("automake" ,automake)
172 ("pkg-config" ,pkg-config)))
173 (propagated-inputs ; header files pulled in by fplll/defs.h
176 (home-page "https://github.com/fplll/fplll")
177 (synopsis "Library for LLL-reduction of euclidean lattices")
179 "fplll contains implementations of several lattice algorithms.
180 The implementation relies on floating-point orthogonalization, and LLL
181 is central to the code, hence the name.
183 It includes implementations of floating-point LLL reduction
184 algorithms, offering different speed/guarantees ratios. It contains
185 a @emph{wrapper} choosing the estimated best sequence of variants in
186 order to provide a guaranteed output as fast as possible. In the case
187 of the wrapper, the succession of variants is oblivious to the user.
189 It includes an implementation of the BKZ reduction algorithm,
190 including the BKZ-2.0 improvements (extreme enumeration
191 pruning, pre-processing of blocks, early termination). Additionally,
192 Slide reduction and self dual BKZ are supported.
194 It also includes a floating-point implementation of the
195 Kannan-Fincke-Pohst algorithm that finds a shortest non-zero lattice
196 vector. For the same task, the GaussSieve algorithm is also available
197 in fplll. Finally, it contains a variant of the enumeration algorithm
198 that computes a lattice vector closest to a given vector belonging to
199 the real span of the lattice.")
200 (license license:lgpl2.1+)))
202 (define-public python-fpylll
204 (name "python-fpylll")
208 ;; Pypi contains and older release, so we use a tagged release from
212 (url "https://github.com/fplll/fpylll")
213 (commit (string-append version "dev"))))
214 (file-name (git-file-name name version))
217 "1a25iibihph626jl4wbs4b77xc4a2c4nfc2ypscf9wpani3dnhjf"))))
218 (build-system python-build-system)
223 ("pari-gp" ,pari-gp)))
225 `(("cysignals" ,python-cysignals)
226 ("cython" ,python-cython)
227 ("flake8" ,python-flake8)
228 ("numpy" ,python-numpy)
229 ("pytest" ,python-pytest)))
230 (home-page "https://github.com/fplll/fpylll")
231 (synopsis "Python interface for fplll")
232 (description "fpylll is a Python wrapper for fplll.")
233 (license license:gpl2+)))
235 (define-public pari-gp
242 "https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
246 "1cgwdpw8b797883z9y92ixxjkv72kiy65zsw2qqf5and1kbzgv41"))))
247 (build-system gnu-build-system)
249 `(("texlive" ,(texlive-union
250 (list texlive-amsfonts)))))
251 (inputs `(("gmp" ,gmp)
254 ("readline" ,readline)))
256 '(#:make-flags '("all")
257 #:test-target "dobench"
259 (modify-phases %standard-phases
261 (lambda* (#:key outputs #:allow-other-keys)
262 (invoke "./Configure"
263 (string-append "--prefix="
264 (assoc-ref outputs "out"))))))))
265 (synopsis "PARI/GP, a computer algebra system for number theory")
267 "PARI/GP is a widely used computer algebra system designed for fast
268 computations in number theory (factorisations, algebraic number theory,
269 elliptic curves...), but it also contains a large number of other useful
270 functions to compute with mathematical entities such as matrices,
271 polynomials, power series, algebraic numbers, etc., and a lot of
272 transcendental functions.
273 PARI is also available as a C library to allow for faster computations.")
274 (license license:gpl2+)
275 (home-page "https://pari.math.u-bordeaux.fr/")))
284 "https://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
288 "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"))))
289 (build-system gnu-build-system)
290 (native-inputs `(("perl" ,perl)))
291 (inputs `(("pari-gp" ,pari-gp)))
294 (list (string-append "--with-paricfg="
295 (assoc-ref %build-inputs "pari-gp")
296 "/lib/pari/pari.cfg"))))
297 (synopsis "PARI/GP, a computer algebra system for number theory")
299 "PARI/GP is a widely used computer algebra system designed for fast
300 computations in number theory (factorisations, algebraic number theory,
301 elliptic curves...), but it also contains a large number of other useful
302 functions to compute with mathematical entities such as matrices,
303 polynomials, power series, algebraic numbers, etc., and a lot of
304 transcendental functions.
305 PARI is also available as a C library to allow for faster computations.
307 GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
308 (license license:gpl2)
309 (home-page "https://pari.math.u-bordeaux.fr/")))
317 ;; Git repo at <https://gitlab.inria.fr/cmh/cmh>.
318 (uri (string-append "http://www.multiprecision.org/downloads/cmh-"
322 "1ws2yhzxmm2l5xqqqcjcimmg40f9qq5l9i6d4i5434an9v9s8531"))))
323 (build-system gnu-build-system)
330 ("pari-gp" ,pari-gp)))
331 (synopsis "Igusa class polynomial computations")
333 "The CMH software computes Igusa (genus 2) class polynomials, which
334 parameterize the CM points in the moduli space of 2-dimensional abelian
335 varieties, i.e. Jacobians of hyperelliptic curves.
336 It can also be used to compute theta constants at arbitrary
338 (license license:gpl3+)
339 (home-page "http://www.multiprecision.org/cmh/home.html")))
348 ;; "~parisse/giac" is not used because the maintainer regularly
349 ;; overwrites the release tarball there, introducing a checksum
350 ;; mismatch every time. See
351 ;; <https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/README>
352 (uri (string-append "https://www-fourier.ujf-grenoble.fr/"
353 "~parisse/debian/dists/stable/main/source/"
354 "giac_" version ".tar.gz"))
356 (base32 "0s926aza2larfz02hrhdlpxn77yjlrhjg844b3fhwz11yj942p9q"))))
357 (build-system gnu-build-system)
359 `(#:modules ((ice-9 ftw)
361 (guix build gnu-build-system))
363 (modify-phases %standard-phases
364 (add-after 'unpack 'patch-bin-cp
365 ;; Some Makefiles contain hard-coded "/bin/cp".
367 (substitute* (cons "micropython-1.12/xcas/Makefile"
368 (find-files "doc" "^Makefile"))
369 (("/bin/cp") (which "cp")))
371 (add-after 'unpack 'disable-failing-test
372 ;; FIXME: Test failing. Not sure why.
374 (substitute* "check/Makefile.in"
377 (add-after 'install 'fix-doc
378 (lambda* (#:key outputs #:allow-other-keys)
379 (let ((out (assoc-ref outputs "out")))
380 ;; Most French documentation has a non-commercial
381 ;; license, so we need to remove it.
382 (with-directory-excursion (string-append out "/share/giac/doc/fr")
383 (for-each delete-file-recursively
384 '("cascas" "casexo" "casgeo" "casrouge" "cassim"
386 ;; Remove duplicate documentation in
387 ;; "%out/share/doc/giac/", where Xcas does not expect
389 (delete-file-recursively (string-append out "/share/doc/giac"))
391 (add-after 'install 'remove-unnecessary-executable
392 (lambda* (#:key outputs #:allow-other-keys)
393 (let ((out (assoc-ref outputs "out")))
394 (delete-file (string-append out "/bin/xcasnew"))
397 ;; TODO: Add libnauty, unbundle "libmicropython.a".
404 ("libjpeg" ,libjpeg-turbo)
406 ("libsamplerate" ,libsamplerate)
408 ("libxinerama" ,libxinerama)
422 ("python" ,python-wrapper)
423 ("readline" ,readline)
424 ("texlive" ,texlive-tiny)))
425 (home-page "https://www-fourier.ujf-grenoble.fr/~parisse/giac.html")
426 (synopsis "Computer algebra system")
428 "Giac/Xcas is a computer algebra system. It has a compatibility mode for
429 maple, mupad and the TI89. It is available as a standalone program (graphic
430 or text interfaces) or as a C++ library.")
431 (license license:gpl3+)))
440 (uri (string-append "http://flintlib.org/flint-" version ".tar.gz"))
442 (base32 "1qrf6hzbbmg7mhkhbb0bab8z2xpdnba5cj4kmmf72lzs0457a6nf"))))
443 (build-system gnu-build-system)
448 ("mpfr" ,mpfr))) ; header files from both are included by flint/arith.h
450 `(#:parallel-tests? #f ; seems to be necessary on arm
452 (modify-phases %standard-phases
453 (add-before 'configure 'newer-c++
455 (substitute* "configure"
459 (lambda* (#:key inputs outputs #:allow-other-keys)
460 (let ((out (assoc-ref outputs "out"))
461 (gmp (assoc-ref inputs "gmp"))
462 (mpfr (assoc-ref inputs "mpfr"))
463 (ntl (assoc-ref inputs "ntl")))
464 ;; Do not pass "--enable-fast-install", which makes the
465 ;; homebrew configure process fail.
466 (invoke "./configure"
467 (string-append "--prefix=" out)
468 (string-append "--with-gmp=" gmp)
469 (string-append "--with-mpfr=" mpfr)
470 (string-append "--with-ntl=" ntl))
472 (synopsis "Fast library for number theory")
474 "FLINT is a C library for number theory. It supports arithmetic
475 with numbers, polynomials, power series and matrices over many base
476 rings, including multiprecision integers and rationals, integers
477 modulo n, p-adic numbers, finite fields (prime and non-prime order)
478 and real and complex numbers (via the Arb extension library).
480 Operations that can be performed include conversions, arithmetic,
481 GCDs, factoring, solving linear systems, and evaluating special
482 functions. In addition, FLINT provides various low-level routines for
484 (license license:lgpl2.1+)
485 (home-page "http://flintlib.org/")))
494 (url "https://github.com/fredrik-johansson/arb")
496 (file-name (git-file-name name version))
499 "15fx3dcbzgwddw9p1nysmx0dbh058afv5m8cj5pdjkcmcl7kw7z9"))))
500 (build-system gnu-build-system)
502 `(("flint" ,flint))) ; flint.h is included by arf.h
508 (modify-phases %standard-phases
510 (lambda* (#:key inputs outputs #:allow-other-keys)
511 (let ((out (assoc-ref outputs "out"))
512 (flint (assoc-ref inputs "flint"))
513 (gmp (assoc-ref inputs "gmp"))
514 (mpfr (assoc-ref inputs "mpfr")))
515 ;; Do not pass "--enable-fast-install", which makes the
516 ;; homebrew configure process fail.
517 (invoke "./configure"
518 (string-append "--prefix=" out)
519 (string-append "--with-flint=" flint)
520 (string-append "--with-gmp=" gmp)
521 (string-append "--with-mpfr=" mpfr))))))))
522 (home-page "https://arblib.org")
523 (synopsis "Arbitrary precision floating-point ball arithmetic")
525 "Arb is a C library for arbitrary-precision floating-point ball
526 arithmetic. It supports efficient high-precision computation with
527 polynomials, power series, matrices and special functions over the
528 real and complex numbers, with automatic, rigorous error control.")
529 (license license:lgpl2.1+)))
531 (define-public python-flint
533 (name "python-flint")
538 (url "https://github.com/fredrik-johansson/python-flint")
540 (file-name (git-file-name name version))
543 "1v0anazbj1cfi68nl2j6dbd31kgkc1563xmr0zk5xk3xj78569pw"))
544 (patches (search-patches "python-flint-includes.patch"))))
545 (build-system python-build-system)
547 `(("python-cython" ,python-cython)))
549 `(("python-numpy" ,python-numpy)))
553 (synopsis "Python module wrapping ARB and FLINT")
555 "Python-flint is a Python extension module wrapping FLINT
556 (Fast Library for Number Theory) and Arb (arbitrary-precision ball
557 arithmetic). It supports integers, rationals, modular integers,
558 real and complex ball arithmetic, polynomials and matrices over all
559 these types and other mathematical functions.")
560 (license license:expat)
561 (home-page "https://fredrikj.net/python-flint/")))
569 (uri (string-append "https://shoup.net/ntl/ntl-"
573 "1nr1h27j2gdz6badzz9lk2pknxhdijqdxqhd3haryh0sw616wzwx"))
574 (modules '((guix build utils)))
577 (delete-file-recursively "src/libtool-origin")
579 (build-system gnu-build-system)
581 `(("libtool" ,libtool)
582 ("perl" ,perl))) ; for configuration
588 (modify-phases %standard-phases
590 (lambda* (#:key inputs outputs #:allow-other-keys)
592 (invoke "./configure"
593 (string-append "PREFIX=" (assoc-ref outputs "out"))
594 (string-append "LIBTOOL=" (assoc-ref inputs "libtool") "/bin/libtool")
595 ;; set the library prefixes explicitly so that they get
596 ;; embedded in the .la file
597 (string-append "GMP_PREFIX=" (assoc-ref inputs "gmp"))
598 (string-append "GF2X_PREFIX=" (assoc-ref inputs "gf2x"))
599 ;; Do not build especially for the build machine.
603 (synopsis "C++ library for number theory")
605 "NTL is a C++ library providing data structures and algorithms
606 for manipulating signed, arbitrary length integers, and for vectors,
607 matrices, and polynomials over the integers and over finite fields.")
608 (license license:gpl2+)
609 (home-page "https://shoup.net/ntl/")))
611 (define-public singular
619 (string-append "http://www.mathematik.uni-kl.de/ftp/pub/Math/"
623 (string-trim-right version #\p
624 0 (1- (string-length version)))
626 "/singular-" version ".tar.gz"))
628 "1524yrni7gh0hir5ckridq671q5s6avfjdsdyahj51kzdl3wcypf"))))
629 (build-system gnu-build-system)
631 `(("doxygen" ,doxygen)
632 ("graphviz" ,graphviz)
641 ("readline" ,readline)))
644 (list (string-append "--with-ntl="
645 (assoc-ref %build-inputs "ntl")))))
646 (synopsis "Computer algebra system for polynomial computations")
648 "Singular is a computer algebra system for polynomial computations,
649 with special emphasis on commutative and non-commutative algebra, algebraic
650 geometry and singularity theory.")
651 ;; Singular itself is dual licensed gpl2 or gpl3, but some of the
652 ;; libraries with which it links are licensed under lgpl3+, so the
653 ;; combined work becomes gpl3. See COPYING in the source code.
654 (license license:gpl3)
655 (home-page "https://www.singular.uni-kl.de/index.php")))
657 (define-public gmp-ecm
664 (let ((hash "00c4c691a1ef8605b65bdf794a71539d"))
665 (string-append "https://gitlab.inria.fr/zimmerma/ecm/"
666 "uploads/" hash "/ecm-" version
669 "0hxs24c2m3mh0nq1zz63z3sb7dhy1rilg2s1igwwcb26x3pb7xqc"))))
670 (build-system gnu-build-system)
674 `(#:configure-flags '("--enable-shared"
675 ;; Disable specific assembly routines, which depend
676 ;; on the subarchitecture of the build machine,
677 ;; and use gmp instead.
678 "--disable-asm-redc")))
679 (synopsis "Integer factorization library using the elliptic curve method")
681 "GMP-ECM factors integers using the elliptic curve method (ECM) as well
682 as the P-1 and P+1 algorithms. It provides a library and a stand-alone
684 ;; Most files are under lgpl3+, but some are under gpl3+ or gpl2+,
685 ;; so the combined work is under gpl3+.
686 (license license:gpl3+)
687 (home-page "http://ecm.gforge.inria.fr/")))
695 (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
698 "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
699 (patches (search-patches "bc-fix-cross-compilation.patch"))))
700 (build-system gnu-build-system)
702 `(("automake" ,automake)
703 ("autoconf" ,autoconf)
706 ("texinfo" ,texinfo)))
709 (list "--with-readline")
711 (modify-phases %standard-phases
712 (add-after 'unpack 'autogen
714 (invoke "autoreconf" "-vif"))))))
715 (home-page "https://www.gnu.org/software/bc/")
716 (synopsis "Arbitrary precision numeric processing language")
718 "bc is an arbitrary precision numeric processing language. It includes
719 an interactive environment for evaluating mathematical statements. Its
720 syntax is similar to that of C, so basic usage is familiar. It also includes
721 \"dc\", a reverse-polish calculator.")
722 (license license:gpl2+)))
724 ;; The original kiss-fft does not have a complete build system and does not
725 ;; build any shared libraries. This is a fork used by Extempore.
726 (define-public kiss-fft-for-extempore
728 (name "kiss-fft-for-extempore")
733 (url "https://github.com/extemporelang/kiss_fft")
735 (file-name (git-file-name name version))
738 "0jasbmqy4wkqrqx3w64s1dfmj34875xmsl72mb26aa4hpyn14bi2"))))
739 (build-system cmake-build-system)
740 (arguments `(#:tests? #f)) ; no tests included
741 ;; Extempore refuses to build on architectures other than x86_64
742 (supported-systems '("x86_64-linux"))
743 (home-page "https://github.com/extemporelang/kiss_fft")
744 (synopsis "Mixed-radix Fast Fourier Transform")
746 "Kiss FFT attempts to be a reasonably efficient, moderately useful FFT
747 that can use fixed or floating data types and can easily be incorporated into
749 (license license:bsd-3)))
757 (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
761 "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1"))))
762 (build-system gnu-build-system)
765 '("--enable-shared" "--enable-openmp" "--enable-threads"
766 ,@(let ((system (or (%current-target-system) (%current-system))))
767 ;; Enable SIMD extensions for codelets. See details at:
768 ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
770 ((string-prefix? "x86_64" system)
771 '("--enable-sse2" "--enable-avx" "--enable-avx2"
772 "--enable-avx512" "--enable-avx-128-fma"))
773 ((string-prefix? "i686" system)
775 ((string-prefix? "aarch64" system)
776 ;; Note that fftw supports NEON on 32-bit ARM only when
777 ;; compiled for single-precision.
781 ;; By default '-mtune=native' is used. However, that may cause the
782 ;; use of ISA extensions (e.g. AVX) that are not necessarily
783 ;; available on the user's machine when that package is built on a
784 ;; different machine.
785 "ax_cv_c_flags__mtune_native=no")))
786 (native-inputs `(("perl" ,perl)))
787 (home-page "http://fftw.org")
788 (synopsis "Computing the discrete Fourier transform")
790 "FFTW is a C subroutine library for computing the discrete Fourier
791 transform (DFT) in one or more dimensions, of arbitrary input size, and of
792 both real and complex data (as well as of even/odd data---i.e. the discrete
793 cosine/ sine transforms or DCT/DST).")
794 (license license:gpl2+)))
797 (package/inherit fftw
800 (substitute-keyword-arguments (package-arguments fftw)
801 ((#:configure-flags fftw-configure-flags)
802 `(cons* "--enable-single"
803 ,@(if (string-prefix? "arm" (or (%current-target-system)
805 ;; fftw supports NEON on 32-bit ARM only when compiled
806 ;; for single-precision, so add it here.
809 ,fftw-configure-flags))))
811 (string-append (package-description fftw)
812 " Single-precision version."))))
814 (define-public fftw-openmpi
815 (package/inherit fftw
816 (name "fftw-openmpi")
818 `(("openmpi" ,openmpi)
819 ,@(package-inputs fftw)))
821 (substitute-keyword-arguments (package-arguments fftw)
822 ((#:configure-flags cf)
823 `(cons "--enable-mpi" ,cf))
824 ((#:phases phases '%standard-phases)
825 `(modify-phases ,phases
826 (add-before 'check 'mpi-setup
829 (string-append (package-description fftw)
830 " With OpenMPI parallelism support."))))
832 (define-public java-la4j
839 (url "https://github.com/vkostyukov/la4j")
841 (file-name (string-append name "-" version "-checkout"))
844 "1qir8dr978cfvz9k12m2kbdwpyf6cqdf1d0ilb7lnkhbgq5i53w3"))))
845 (build-system ant-build-system)
847 `(#:jar-name "la4j.jar"
849 #:test-exclude (list "**/Abstract*.java"
851 "**/DenseMatrixTest.java"
852 "**/SparseMatrixTest.java"
854 "**/SparseVectorTest.java"
855 "**/DenseVectorTest.java")))
857 `(("java-junit" ,java-junit)
858 ("java-hamcrest-core" ,java-hamcrest-core)))
859 (home-page "http://la4j.org/")
860 (synopsis "Java library that provides Linear Algebra primitives and algorithms")
861 (description "The la4j library is a Java library that provides Linear
862 Algebra primitives (matrices and vectors) and algorithms. The key features of
863 the la4j library are:
866 @item No dependencies and tiny size
867 @item Fluent object-oriented/functional API
868 @item Sparse (CRS, CCS) and dense (1D/2D arrays) matrices
869 @item Linear systems solving (Gaussian, Jacobi, Zeidel, Square Root, Sweep and other)
870 @item Matrices decomposition (Eigenvalues/Eigenvectors, SVD, QR, LU, Cholesky and other)
871 @item MatrixMarket/CSV IO formats support for matrices and vectors
873 (license license:asl2.0)))
875 (define-public java-jlargearrays
877 (name "java-jlargearrays")
881 (uri (string-append "https://repo1.maven.org/maven2/"
882 "pl/edu/icm/JLargeArrays/"
883 version "/JLargeArrays-" version
885 (file-name (string-append name "-" version ".jar"))
888 "0v05iphpxbjnd7f4jf1rlqq3m8hslhcm0imdbsgxr20pi3xkaf2a"))))
889 (build-system ant-build-system)
891 `(#:jar-name "jlargearrays.jar"
892 #:tests? #f ; tests are not included in the release archive
895 `(("java-commons-math3" ,java-commons-math3)))
896 (home-page "https://gitlab.com/ICM-VisLab/JLargeArrays")
897 (synopsis "Library of one-dimensional arrays that can store up to 263 elements")
898 (description "JLargeArrays is a Java library of one-dimensional arrays
899 that can store up to 263 elements.")
900 (license license:bsd-2)))
902 (define-public java-jtransforms
904 (name "java-jtransforms")
908 (uri (string-append "https://repo1.maven.org/maven2/"
909 "com/github/wendykierp/JTransforms/"
910 version "/JTransforms-" version "-sources.jar"))
913 "1haw5m8shv5srgcpwkl853dz8bv6h90bzlhcps6mdpb4cixjirsg"))))
914 (build-system ant-build-system)
916 `(#:jar-name "jtransforms.jar"
917 #:tests? #f ; tests are not included in the release archive
920 `(("java-commons-math3" ,java-commons-math3)
921 ("java-jlargearrays" ,java-jlargearrays)))
922 (home-page "https://github.com/wendykierp/JTransforms")
923 (synopsis "Multithreaded FFT library written in pure Java")
924 (description "JTransforms is a multithreaded FFT library written in pure
925 Java. Currently, four types of transforms are available: @dfn{Discrete
926 Fourier Transform} (DFT), @dfn{Discrete Cosine Transform} (DCT), @dfn{Discrete
927 Sine Transform} (DST) and @dfn{Discrete Hartley Transform} (DHT).")
928 (license license:bsd-2)))
937 (url "https://jugit.fz-juelich.de/mlz/lmfit.git")
938 (commit (string-append "v" version))))
939 (file-name (git-file-name name version))
942 "00bch77a6qgnw6vzsjn2a42n8n683ih3xm0wpr454jxa15hw78vf"))))
943 (build-system cmake-build-system)
945 `(("perl" ,perl))) ; for pod2man
946 (home-page "https://jugit.fz-juelich.de/mlz/lmfit")
947 (synopsis "Levenberg-Marquardt minimization and least-squares fitting")
948 (description "lmfit is a C library for Levenberg-Marquardt least-squares
949 minimization and curve fitting. It is mature code, based on decades-old
950 algorithms from the FORTRAN library MINPACK.")
951 (license license:bsd-2)))
953 (define-public symengine
961 (url "https://github.com/symengine/symengine")
962 (commit (string-append "v" version))))
963 (file-name (git-file-name name version))
965 (base32 "129iv9maabmb42ylfdv0l0g94mcbf3y4q3np175008rcqdr8z6h1"))))
966 (build-system cmake-build-system)
969 ;; These are the suggested build options in the README.
970 '("-DCMAKE_BUILD_TYPE=Release"
974 "-DINTEGER_CLASS=flint"
975 "-DWITH_SYMENGINE_THREAD_SAFE=on"
976 "-DBUILD_SHARED_LIBS=on"))) ;also build libsymengine
982 (home-page "https://github.com/symengine/symengine")
983 (synopsis "Fast symbolic manipulation library")
985 "SymEngine is a standalone fast C++ symbolic manipulation library.
986 Optional thin wrappers allow usage of the library from other languages.")
987 (license (list license:expat ;SymEngine
988 license:bsd-3)))) ;3rd party code
997 (string-append "https://bitbucket.org/eigen/eigen/get/"
999 (string-append "mirror://debian/pool/main/e/eigen3/eigen3_"
1000 version ".orig.tar.bz2")))
1003 "1vxrsncfnkyq6gwxpsannpryp12mk7lc8f42ybvz3saf7icwc582"))
1004 (file-name (string-append name "-" version ".tar.bz2"))
1005 (patches (search-patches "eigen-remove-openmp-error-counting.patch"
1006 "eigen-stabilise-sparseqr-test.patch"))
1007 (modules '((guix build utils)))
1009 ;; There are 3 test failures in the "unsupported" directory,
1010 ;; but maintainers say it's a known issue and it's unsupported
1011 ;; anyway, so just skip them.
1013 (substitute* "unsupported/CMakeLists.txt"
1014 (("add_subdirectory\\(test.*")
1015 "# Do not build the tests for unsupported features.\n"))
1017 (build-system cmake-build-system)
1019 '(;; Turn off debugging symbols to save space.
1020 #:build-type "Release"
1022 #:phases (modify-phases %standard-phases
1025 (let* ((cores (parallel-job-count))
1026 (dash-j (format #f "-j~a" cores)))
1027 (setenv "EIGEN_SEED" "1") ;for reproducibility
1028 ;; First build the tests, in parallel. See
1029 ;; <http://eigen.tuxfamily.org/index.php?title=Tests>.
1030 (invoke "make" "buildtests" dash-j)
1032 ;; Then run 'CTest' with -V so we get more
1033 ;; details upon failure.
1034 (invoke "ctest" "-V" dash-j)))))))
1035 (home-page "https://eigen.tuxfamily.org")
1036 (synopsis "C++ template library for linear algebra")
1038 "Eigen is a C++ template library for linear algebra: matrices, vectors,
1039 numerical solvers, and related algorithms. It provides an elegant API based
1040 on \"expression templates\". It is versatile: it supports all matrix sizes,
1041 all standard numeric types, various matrix decompositions and geometry
1042 features, and more.")
1044 ;; Most of the code is MPLv2, with a few files under LGPLv2.1+ or BSD-3.
1045 ;; See 'COPYING.README' for details.
1046 (license license:mpl2.0)))
1048 (define-public eigen-for-tensorflow
1049 (let ((changeset "fd6845384b86")
1051 (package (inherit eigen)
1052 (name "eigen-for-tensorflow")
1053 (version (string-append "3.3.5-" revision "." changeset))
1057 (url "https://bitbucket.org/eigen/eigen")
1058 (changeset changeset)))
1061 "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
1062 (file-name (string-append name "-" version "-checkout"))
1063 (modules '((guix build utils)))
1065 ;; There are 3 test failures in the "unsupported" directory,
1066 ;; but maintainers say it's a known issue and it's unsupported
1067 ;; anyway, so just skip them.
1069 (substitute* "unsupported/CMakeLists.txt"
1070 (("add_subdirectory\\(test.*")
1071 "# Do not build the tests for unsupported features.\n"))
1074 (define-public xtensor
1081 (url "https://github.com/xtensor-stack/xtensor")
1085 "1fmv2hpx610xwhxrndfsfvlbqfyk4l3gi5q5d7pa9m82kblxjj9l"))
1086 (file-name (git-file-name name version))))
1087 (build-system cmake-build-system)
1089 `(("googletest" ,googletest)
1093 '("-DBUILD_TESTS=ON")
1094 #:test-target "xtest"))
1095 (home-page "https://xtensor.readthedocs.io/en/latest/")
1096 (synopsis "C++ tensors with broadcasting and lazy computing")
1097 (description "xtensor is a C++ library meant for numerical analysis with
1098 multi-dimensional array expressions.
1102 @item an extensible expression system enabling lazy broadcasting.
1103 @item an API following the idioms of the C++ standard library.
1104 @item tools to manipulate array expressions and build upon xtensor.
1106 (license license:bsd-3)))
1115 (uri (string-append "https://files.gap-system.org/gap-"
1116 (version-major+minor version)
1121 (base32 "00l6hvy4iggnlrib4vp805sxdm3j7n3hzpv5zs9hbiiavh80l1xz"))
1122 (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1)))
1125 ;; Delete the external gmp and zlib libraries
1126 ;; and a subdirectory not needed for our build.
1127 (for-each delete-file-recursively
1128 '("extern" "hpcgap"))
1129 ;; Delete a failing test.
1130 ;; FIXME: This might be fixed in the next release, see
1131 ;; https://github.com/gap-system/gap/issues/3292
1132 (delete-file "tst/testinstall/dir.tst")
1133 ;; Delete all packages except for a fixed list,
1134 ;; given by their names up to version numbers.
1135 (with-directory-excursion "pkg"
1136 (for-each delete-file-recursively
1138 (lambda (all keep) (string-prefix? keep all))
1141 ;; Necessary packages.
1144 "SmallGrp-" ; artistic2.0
1145 "transgrp" ; artistic2.0 for data,
1146 ; gpl2 or gpl3 for code
1147 ;; Recommended package.
1149 ;; Optional packages, searched for at start,
1150 ;; and their depedencies.
1154 "ctbllib" ; gpl3+, clarified in the next release;
1156 ; http://www.math.rwth-aachen.de/~Thomas.Breuer/ctbllib/README.md
1169 (build-system gnu-build-system)
1172 ("readline" ,readline)
1175 `(#:modules ((ice-9 ftw)
1177 (guix build gnu-build-system)
1180 (modify-phases %standard-phases
1181 (add-after 'build 'build-packages
1182 ;; Compile all packages that have not been deleted by the
1183 ;; code snippet above.
1185 (setenv "CONFIG_SHELL" (which "bash"))
1186 (with-directory-excursion "pkg"
1187 (invoke "../bin/BuildPackages.sh")
1189 (add-after 'build-packages 'build-doc
1190 ;; The documentation is bundled, but we create it from source.
1192 (with-directory-excursion "doc"
1193 (invoke "./make_doc"))
1196 (lambda* (#:key outputs #:allow-other-keys)
1197 (let* ((out (assoc-ref outputs "out"))
1198 (bin (string-append out "/bin"))
1199 (prog (string-append bin "/gap"))
1200 (prog-real (string-append bin "/.gap-real"))
1201 (share (string-append out "/share/gap")))
1202 ;; Install only the gap binary; the gac compiler is left
1203 ;; for maybe later. "Wrap" it in a shell script that calls
1204 ;; the binary with the correct parameter.
1205 ;; The make target install-bin is supposed to do that, but
1206 ;; is not currently working.
1208 (copy-file "gap" prog-real)
1209 (call-with-output-file prog
1212 "#!~a~%exec ~a -l ~a \"$@\"~%"
1217 ;; Install the headers and library, which are needed by Sage.
1218 (invoke "make" "install-headers")
1219 (invoke "make" "install-libgap")
1220 ;; Remove information on the build directory from sysinfo.gap.
1221 (substitute* "sysinfo.gap"
1222 (("GAP_BIN_DIR=\".*\"") "GAP_BIN_DIR=\"\"")
1223 (("GAP_LIB_DIR=\".*\"") "GAP_LIB_DIR=\"\"")
1224 (("GAP_CPPFLAGS=\".*\"") "GAP_CPPFLAGS=\"\""))
1225 (invoke "make" "install-gaproot")
1226 ;; Copy the directory of compiled packages; the make target
1227 ;; install-pkg is currently empty.
1228 (copy-recursively "pkg" (string-append share "/pkg")))
1230 (home-page "https://www.gap-system.org/")
1232 "System for computational group theory")
1234 "GAP is a system for computational discrete algebra, with particular
1235 emphasis on computational group theory. It provides a programming language,
1236 a library of thousands of functions implementing algebraic algorithms
1237 written in the GAP language as well as large data libraries of algebraic
1239 ;; Some packages have different licenses (effectively forcing the
1240 ;; combined work to be licensed as gpl3+); if this is the case, this
1241 ;; is mentioned above next to their name.
1242 ;; Some packages have no license mentioned explicitly; supposedly this
1243 ;; means that the gpl2+ licence of GAP itself applies, but to be on the
1244 ;; safe side, we drop them for now.
1245 (license license:gpl2+)))
1247 (define-public givaro
1254 (url "https://github.com/linbox-team/givaro")
1255 (commit (string-append "v" version))))
1256 (file-name (git-file-name name version))
1259 "11wz57q6ijsvfs5r82masxgr319as92syi78lnl9lgdblpc6xigk"))))
1260 (build-system gnu-build-system)
1262 `(("autoconf" ,autoconf)
1263 ("automake" ,automake)
1264 ("libtool" ,libtool)))
1266 `(("gmp" ,gmp))) ; gmp++.h includes gmpxx.h
1267 (synopsis "Algebraic computations with exact rings and fields")
1269 "Givaro is a C++ library implementing the basic arithmetic of various
1270 algebraic objects: prime fields, extension fields, finite fields, finite
1271 rings, polynomials, algebraic numbers, arbitrary precision integers and
1272 rationals (C++ wrappers over gmp), fixed precision integers. It also
1273 provides data-structures and templated classes for the manipulation of
1274 compound objects, such as vectors, matrices and univariate polynomials.")
1275 (license license:cecill-b)
1276 (home-page "https://github.com/linbox-team/givaro")))
1278 (define-public fflas-ffpack
1280 (name "fflas-ffpack")
1285 (url "https://github.com/linbox-team/fflas-ffpack")
1287 (file-name (git-file-name name version))
1290 "1ynbjd72qrwp0b4kpn0p5d7gddpvj8dlb5fwdxajr5pvkvi3if74"))))
1291 (build-system gnu-build-system)
1293 `(("autoconf" ,autoconf)
1294 ("automake" ,automake)
1295 ("libtool" ,libtool)
1296 ("pkg-config" ,pkg-config)))
1298 `(("openblas" ,openblas)))
1300 `(("givaro" ,givaro))) ; required according to the .pc file
1303 (list (string-append "--with-blas-libs="
1304 (assoc-ref %build-inputs "openblas")
1305 "/lib/libopenblas.so"))))
1306 (synopsis "C++ library for linear algebra over finite fields")
1308 "FFLAS-FFPACK is a C++ template library for basic linear algebra
1309 operations over a finite field.
1310 FFLAS (Finite Field Linear Algebra Subprograms) provides the implementation
1311 of a subset of routines of the numerical BLAS; it also supports sparse
1312 matrix-vector products.
1313 FFPACK (Finite Field Linear Algebra Package) is inspired by the LAPACK
1314 library to provide functionalities of higher level, using the kernel
1315 of a BLAS. Additionally, it provides routines specific to exact linear
1316 algebra, such as the row echelon form.")
1317 (license license:lgpl2.1+)
1318 (home-page "https://linbox-team.github.io/fflas-ffpack/")))
1320 (define-public linbox
1327 (url "https://github.com/linbox-team/linbox")
1328 (commit (string-append "v" version))))
1329 (file-name (git-file-name name version))
1332 "10j6dspbsq7d2l4q3y0c1l1xwmaqqba2fxg59q5bhgk9h5d7q571"))
1333 (patches (search-patches "linbox-fix-pkgconfig.patch"))))
1334 (build-system gnu-build-system)
1336 `(("autoconf" ,autoconf)
1337 ("automake" ,automake)
1338 ("libtool" ,libtool)
1339 ("pkg-config" ,pkg-config)))
1341 `(("fflas-ffpack" ,fflas-ffpack)))
1342 (synopsis "C++ library for linear algebra over exact rings")
1344 "LinBox is a C++ template library for exact linear algebra computation
1345 with dense, sparse, and structured matrices over the integers and over
1347 (license license:lgpl2.1+)
1348 (home-page "https://linbox-team.github.io/linbox/")))
1353 (version "20140914")
1357 (url "https://bitbucket.org/malb/m4ri")
1358 (commit (string-append "release-" version))))
1359 (file-name (git-file-name name version))
1362 "0xfg6pffbn8r1s0y7bn9b8i55l00d41dkmhrpf7pwk53qa3achd3"))))
1363 (build-system gnu-build-system)
1365 `(("autoconf" ,autoconf)
1366 ("automake" ,automake)
1367 ("libtool" ,libtool)
1368 ("pkg-config" ,pkg-config)))
1370 `(("libpng" ,libpng)))
1371 (synopsis "Arithmetic of dense matrices over F_2")
1372 (description "M4RI is a library for fast arithmetic with dense matrices
1373 over F2. The name M4RI comes from the first implemented algorithm: The
1374 Method of the Four Russians inversion algorithm published by Gregory Bard.
1375 This algorithm in turn is named after the Method of the Four Russians
1376 multiplication algorithm.")
1377 (license license:gpl2+)
1378 (home-page "https://bitbucket.org/malb/m4ri/")))
1380 (define-public symmetrica
1385 (method url-fetch/tarbomb)
1386 (uri (let ((v (string-join (string-split version #\.) "_")))
1387 (string-append "http://www.algorithm.uni-bayreuth.de/"
1388 "en/research/SYMMETRICA/"
1389 "SYM" v "_tar.gz")))
1392 "1qhfrbd5ybb0sinl9pad64rscr08qvlfzrzmi4p4hk61xn6phlmz"))
1393 ;; Taken from <https://git.sagemath.org/sage.git/plain/build/pkgs/symmetrica/patches/>
1394 (patches (search-patches "symmetrica-bruch.patch"
1395 "symmetrica-int32.patch"
1396 "symmetrica-return_values.patch"
1397 "symmetrica-sort_sum_rename.patch"))))
1398 (build-system gnu-build-system)
1400 `(#:tests? #f ;no test
1402 (modify-phases %standard-phases
1403 (add-after 'unpack 'fix-makefile
1405 (substitute* "makefile"
1406 (("cc -c") "gcc -c -fPIC"))
1408 (add-after 'fix-makefile 'turn-off-banner
1411 (("(INT no_banner = )FALSE" _ pre) (string-append pre "TRUE")))
1413 (delete 'configure) ;no configure script
1414 (replace 'install ;no install target
1415 (lambda* (#:key outputs #:allow-other-keys)
1416 (let* ((out (assoc-ref outputs "out"))
1417 (lib (string-append out "/lib"))
1418 (inc (string-append out "/include/symmetrica"))
1419 (doc (string-append out "/share/doc/symmetrica-" ,version))
1420 (static "libsymmetrica.a"))
1421 ;; Build static library.
1422 (apply invoke "ar" "crs" static (find-files "." "\\.o$"))
1423 (invoke "ranlib" static)
1424 ;; Install static library and headers.
1425 (for-each (lambda (f) (install-file f inc))
1426 (find-files "." "\\.h$"))
1427 (install-file "libsymmetrica.a" lib)
1428 ;; Install documentation.
1429 (for-each (lambda (f) (install-file f doc))
1430 (find-files "." "\\.doc$"))
1432 (home-page "http://www.algorithm.uni-bayreuth.de/en/research/SYMMETRICA/")
1433 (synopsis "Combinatoric C Library")
1434 (description "Symmetrica is a library for combinatorics. It has support
1435 for the representation theory of the symmetric group and related groups,
1436 combinatorics of tableaux, symmetric functions and polynomials, Schubert
1437 polynomials, and the representation theory of Hecke algebras of type A_n.")
1438 (license license:public-domain)))
1440 (define-public m4rie
1443 (version "20150908")
1447 (url "https://bitbucket.org/malb/m4rie")
1448 (commit (string-append "release-" version))))
1449 (file-name (git-file-name name version))
1452 "0r8lv46qx5mkz5kp3ay2jnsp0mbhlqr5z2z220wdk73wdshcznss"))))
1453 (build-system gnu-build-system)
1455 `(("autoconf" ,autoconf)
1456 ("automake" ,automake)
1457 ("libtool" ,libtool)))
1460 (synopsis "Arithmetic of dense matrices over F_{2^e}")
1461 (description "M4RI is a library for fast arithmetic with dense matrices
1462 over finite fields of characteristic 2. So it extends the functionality
1463 of M4RI from F_2 to F_{2^e}.")
1464 (license license:gpl2+)
1465 (home-page "https://bitbucket.org/malb/m4rie/")))
1467 (define-public eclib
1470 (version "20190909")
1474 (url "https://github.com/JohnCremona/eclib/")
1475 (commit (string-append "v" version))))
1476 (file-name (git-file-name name version))
1479 "1gw27lqc3f525n8qdcmr2nyn16y9g10z9f6dnmckyyxcdzvhq35n"))))
1480 (build-system gnu-build-system)
1482 `(("autoconf" ,autoconf)
1483 ("automake" ,automake)
1484 ("libtool" ,libtool)))
1487 ("pari-gp" ,pari-gp)))
1488 (synopsis "Ranks of elliptic curves and modular symbols")
1489 (description "The eclib package includes mwrank (for 2-descent on
1490 elliptic curves over Q) and modular symbol code; it has been written by
1491 John Cremona to compute his elliptic curve database.")
1492 (license license:gpl2+)
1493 (home-page (string-append "http://homepages.warwick.ac.uk/staff/"
1494 "J.E.Cremona/mwrank/index.html"))))
1496 (define-public lrcalc
1503 (url "https://bitbucket.org/asbuch/lrcalc")
1504 (commit (string-append "lrcalc-" version))))
1505 (file-name (git-file-name name version))
1508 "1c12d04jdyxkkav4ak8d1aqrv594gzihwhpxvc6p9js0ry1fahss"))
1509 (patches (search-patches "lrcalc-includes.patch"))))
1510 (build-system gnu-build-system)
1512 `(("autoconf" ,autoconf)
1513 ("automake" ,automake)
1514 ("libtool" ,libtool)))
1517 (modify-phases %standard-phases
1518 (add-before 'build 'fix-permission
1520 (chmod "lrcalc.maple.src" #o644)
1522 (synopsis "Littlewood-Richardson calculator in algebraic combinatorics")
1523 (description "The Littlewood-Richardson Calculator (lrcalc) is a
1524 program designed to compute Littlewood-Richardson coefficients. It computes
1525 single Littlewood-Richardson coefficients, products of Schur functions, or
1526 skew Schur functions. In addition it computes products in the small quantum
1527 cohomology ring of a Grassmann variety. The software package also includes
1528 a program that performs fast computation of the more general multiplicative
1529 structure constants of Schubert polynomials.")
1530 (license license:gpl2+)
1531 (home-page "https://sites.math.rutgers.edu/~asbuch/lrcalc/")))
1540 (uri (string-append "http://www.cs.uwaterloo.ca/~astorjoh/iml-"
1541 version ".tar.bz2"))
1544 "0akwhhz9b40bz6lrfxpamp7r7wkk48p455qbn04mfnl9a1l6db8x"))))
1545 (build-system gnu-build-system)
1548 ("cblas" ,openblas))) ; or any other BLAS library; the documentation
1549 ; mentions ATLAS in particular
1554 (string-append "--with-gmp-include="
1555 (assoc-ref %build-inputs "gmp") "/include")
1556 (string-append "--with-gmp-lib="
1557 (assoc-ref %build-inputs "gmp") "/lib")
1558 "--with-cblas=-lopenblas"
1559 (string-append "--with-cblas-include="
1560 (assoc-ref %build-inputs "cblas") "/include")
1561 (string-append "--with-cblas-lib="
1562 (assoc-ref %build-inputs "cblas") "/lib"))))
1563 (home-page "https://cs.uwaterloo.ca/~astorjoh/iml.html")
1565 "Solver for systems of linear equations over the integers")
1567 "IML is a C library implementing algorithms for computing exact
1568 solutions to dense systems of linear equations over the integers.
1569 Currently, IML provides the following functionality:
1572 @item Nonsingular rational system solving:
1573 compute the unique rational solution X to the system AX=B, where A and B
1574 are integer matrices, A nonsingular.
1575 @item Compute the right nullspace or kernel of an integer matrix.
1576 @item Certified linear system solving:
1577 compute a minimal denominator solution x to a system Ax=b, where b is an
1578 integer vector and A is an integer matrix with arbitrary shape and
1582 In addition, IML provides some low level routines for a variety of mod p
1583 matrix operations: computing the row-echelon form, determinant, rank
1584 profile, and inverse of a mod p matrix. These mod p routines are not
1585 general purpose; they require that p satisfy some preconditions based on
1586 the dimension of the input matrix (usually p should be prime and should be
1587 no more than about 20 bits long).")
1588 (license license:bsd-3)))
1590 (define-public r-dtt
1597 (uri (cran-uri "dtt" version))
1600 "0n8gj5iylfagdbaqirpykb01a9difsy4zl6qq55f0ghvazxqdvmn"))))
1601 (properties `((upstream-name . "dtt")))
1602 (build-system r-build-system)
1603 (home-page "http://www.r-project.org")
1604 (synopsis "Discrete Trigonometric Transforms")
1606 "This package provides functions for 1D and 2D Discrete Cosine Transform
1607 (@dfn{DCT}), Discrete Sine Transform (@dfn{DST}) and Discrete Hartley Transform
1609 (license license:gpl2+)))