summaryrefslogtreecommitdiff
path: root/gnu/packages/algebra.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/algebra.scm')
-rw-r--r--gnu/packages/algebra.scm151
1 files changed, 97 insertions, 54 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 83572e2fc6..4ee152d1e7 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -14,7 +14,7 @@
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021, 2023, 2024, 2025 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Lars-Dominik Braun <ldb@leibniz-psychology.org>
-;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2023 Mehmet Tekman <mtekman89@gmail.com>
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2025 Nigko Yerden <nigko.yerden@gmail.com>
@@ -401,7 +401,7 @@ precision.")
(define-public giac
(package
(name "giac")
- (version "1.9.0-998")
+ (version "2.0.0-10")
(source
(origin
(method url-fetch)
@@ -413,7 +413,7 @@ precision.")
"https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/"
"stable/main/source/giac_" version ".tar.gz"))
(sha256
- (base32 "1r71kl21xxf3872r0q25r2b9wpg03zrp08rsnpyqrhajmxb0ljbz"))))
+ (base32 "1lzb0jjmkg5ml1qfl0m00qqng4sxgfqwrbq10gpkp4b301k2ckv1"))))
(build-system gnu-build-system)
(arguments
(list
@@ -428,12 +428,12 @@ precision.")
(substitute* (cons "micropython-1.12/xcas/Makefile"
(find-files "doc" "^Makefile"))
(("/bin/cp") (which "cp")))))
- (add-after 'unpack 'disable-failing-test
- ;; FIXME: Tests failing. Not sure why.
- (lambda _
- (substitute* "check/Makefile.in"
- (("chk_fhan(4|11)") "")
- (("chk_fhan(14|21)") "")))) ;fail specifically on i686
+ (replace 'bootstrap
+ (lambda _
+ ;; XXX: Regenerate "src/mkjs" to avoid a build error because
+ ;; the default file is bogus in a Guix environment.
+ (delete-file "src/mkjs")
+ (invoke "autoreconf" "-vfi")))
(add-after 'install 'fix-doc
(lambda _
;; Most French documentation has a non-commercial license, so we
@@ -454,7 +454,7 @@ precision.")
;; TODO: Unbundle "libmicropython.a".
(list ao
fltk-1.3
- glpk-4
+ glpk
gmp
gsl
libjpeg-turbo
@@ -474,9 +474,12 @@ precision.")
perl
tcsh))
(native-inputs
- (list bison
+ (list autoconf
+ automake
+ bison
flex
hevea
+ libtool
python-wrapper
readline
(texlive-local-tree)))
@@ -527,9 +530,6 @@ fast arithmetic.")
(properties
'((release-monitoring-url . "http://flintlib.org/downloads.html")))))
-(define-public arb
- (deprecated-package "arb" flint))
-
(define-public python-flint
(package
(name "python-flint")
@@ -722,19 +722,18 @@ binary.")
(define-public bc
(package
(name "bc")
- (version "1.07.1")
+ (version "1.08.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
(sha256
(base32
- "0amh9ik44jfg66csyvf4zz1l878c4755kjndq9j0270akflgrbb2"))
- (patches (search-patches "bc-fix-cross-compilation.patch"))))
+ "11jzg23ks39k58bnb5y55wxqqz6h534ys5900hz6axcp8bn0yixf"))))
(build-system gnu-build-system)
(native-inputs
(list automake autoconf ed flex readline texinfo))
(inputs
- (list readline))
+ (list readline ncurses))
(arguments
'(#:configure-flags
(list "--with-readline")
@@ -750,7 +749,7 @@ binary.")
an interactive environment for evaluating mathematical statements. Its
syntax is similar to that of C, so basic usage is familiar. It also includes
\"dc\", a reverse-polish calculator.")
- (license license:gpl2+)))
+ (license license:gpl3+)))
;; The original kiss-fft does not have a complete build system and does not
;; build any shared libraries. This is a fork used by Extempore.
@@ -779,6 +778,34 @@ that can use fixed or floating data types and can easily be incorporated into
a C program.")
(license license:bsd-3)))
+(define-public kissfft
+ (package
+ (name "kissfft")
+ (version "131.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mborgerding/kissfft")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256 "1yfws5bn4kh62yk6hdyp9h9775l6iz7wsfisbn58jap6b56s8j5s")))
+ (build-system cmake-build-system)
+ (native-inputs
+ (list googletest
+ pkg-config
+ python-numpy-2
+ python-wrapper))
+ (inputs
+ (list fftw
+ libpng))
+ (home-page "https://github.com/mborgerding/kissfft")
+ (synopsis "Simple @acronym{FFT, Fast Fourier Transform} library")
+ (description
+ "Kiss FFT is a mixed-radix Fast Fourier Transform based up on the
+principle, 'Keep It Simple, Stupid.'")
+ (license license:bsd-3)))
+
(define-public fftw
(package
(name "fftw")
@@ -1183,7 +1210,7 @@ Python.")
;; Then run 'CTest' with -V so we get more
;; details upon failure.
(invoke "ctest" "-V" dash-j))))))))
- (home-page "https://eigen.tuxfamily.org")
+ (home-page "https://eigen.tuxfamily.org/index.php?title=Main_Page")
(synopsis "C++ template library for linear algebra")
(description
"Eigen is a C++ template library for linear algebra: matrices, vectors,
@@ -1235,40 +1262,56 @@ features, and more.")
(synopsis "Micro-benchmarks of the Eigen linear algebra library")))
-(define-public eigen-for-tensorflow
- (let ((changeset "fd6845384b86")
- (revision "1"))
- (package (inherit eigen)
- (name "eigen-for-tensorflow")
- (version (string-append "3.3.5-" revision "." changeset))
- (source (origin
- (method hg-fetch)
- (uri (hg-reference
- (url "https://bitbucket.org/eigen/eigen")
- (changeset changeset)))
- (sha256
- (base32
- "12cwgah63wqwb66xji048hcxc1z5zjg8a7701zlia5zbilnnk1n5"))
- (file-name (string-append name "-" version "-checkout"))
- (modules '((guix build utils)))
- (snippet
- ;; There are 3 test failures in the "unsupported" directory,
- ;; but maintainers say it's a known issue and it's unsupported
- ;; anyway, so just skip them.
- '(begin
- (substitute* "unsupported/CMakeLists.txt"
- (("add_subdirectory\\(test.*")
- "# Do not build the tests for unsupported features.\n"))))))
- (arguments
- (substitute-keyword-arguments (package-arguments eigen)
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'disable-some-tests)
- ;; This test cannot be compiled
- (add-after 'unpack 'gcc-compatibility
- (lambda _
- (substitute* "test/CMakeLists.txt"
- (("ei_add_test\\(stddeque") "#")))))))))))
+(define-public eigen-for-onnxruntime
+ (let ((commit "1d8b82b0740839c0de7f1242a3585e3390ff5f33")
+ (revision "0"))
+ (hidden-package
+ (package
+ (inherit eigen)
+ (name "eigen-for-onnxruntime")
+ (version (git-version "3.4.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/libeigen/eigen")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0pxh81jjnz97ndwaanla6zch1128bfdrf2kgqxgxyjvqbdg1vqwi"))))
+ ;; XXX: Some tests fail, but onnxruntime will move on to the next
+ ;; release soon enough.
+ (arguments
+ (substitute-keyword-arguments (package-arguments eigen)
+ ((#:tests? tests? #t)
+ #f)))))))
+
+;; XXX: python-ml-dtypes uses this commit specifically since at least version
+;; 0.2.0. It's not compiling with another eigen, so build this one for now.
+(define-public eigen-for-python-ml-dtypes
+ (let ((commit "7bf2968fed5f246c0589e1111004cb420fcd7c71")
+ (revision "0"))
+ (hidden-package
+ (package
+ (inherit eigen)
+ (name "eigen-for-python-ml-dtypes")
+ (version (git-version "3.4.0" revision commit))
+ (source
+ (origin
+ (inherit (package-source eigen))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.com/libeigen/eigen")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0yq69h7pasbzq5r83d974xi031r0z2y2x0my1rz5crky54i1j0r7"))
+ (patches '())))
+ ;; XXX: Tests stable_norm_5 and stable_norm_6 are failing due to
+ ;; EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE.
+ (arguments
+ (substitute-keyword-arguments (package-arguments eigen)
+ ((#:tests? flag #f) #false)))))))
(define-public xtensor
(package