Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

227 rader
9.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013 Andreas Enge <andreas@enge.fr>
  3. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  8. ;;; under the terms of the GNU General Public License as published by
  9. ;;; the Free Software Foundation; either version 3 of the License, or (at
  10. ;;; your option) any later version.
  11. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  13. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;;; GNU General Public License for more details.
  16. ;;;
  17. ;;; You should have received a copy of the GNU General Public License
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (gnu packages algebra)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages multiprecision)
  22. #:use-module (gnu packages perl)
  23. #:use-module (gnu packages readline)
  24. #:use-module (gnu packages flex)
  25. #:use-module (guix licenses)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix build-system gnu))
  29. (define-public mpfrcx
  30. (package
  31. (name "mpfrcx")
  32. (version "0.4.2")
  33. (source (origin
  34. (method url-fetch)
  35. (uri (string-append
  36. "http://www.multiprecision.org/mpfrcx/download/mpfrcx-"
  37. version ".tar.gz"))
  38. (sha256
  39. (base32
  40. "0grw66b255r574lvll1bqccm5myj2m8ajzsjaygcyq9zjnnbnhhy"))))
  41. (build-system gnu-build-system)
  42. (inputs `(("gmp" ,gmp)
  43. ("mpfr" ,mpfr)
  44. ("mpc" ,mpc)))
  45. (synopsis "mpfrcx, a library for the arithmetic of univariate polynomials
  46. over arbitrary precision real or complex numbers")
  47. (description
  48. "mpfrcx is a library for the arithmetic of univariate polynomials over
  49. arbitrary precision real (mpfr) or complex (mpc) numbers, without control
  50. on the rounding. For the time being, only the few functions needed to
  51. implement the floating point approach to complex multiplication are
  52. implemented. On the other hand, these comprise asymptotically fast
  53. multiplication routines such as Toom–Cook and the FFT. ")
  54. (license lgpl2.1+)
  55. (home-page "http://mpfrcx.multiprecision.org/")))
  56. (define-public fplll
  57. (package
  58. (name "fplll")
  59. (version "4.0.4")
  60. (source (origin
  61. (method url-fetch)
  62. (uri (string-append
  63. "http://perso.ens-lyon.fr/damien.stehle/fplll/libfplll-"
  64. version ".tar.gz"))
  65. (sha256 (base32
  66. "1cbiby7ykis4z84swclpysrljmqhfcllpkcbll1m08rzskgb1a6b"))))
  67. (build-system gnu-build-system)
  68. (inputs `(("gmp" ,gmp)
  69. ("mpfr" ,mpfr)))
  70. (synopsis "fplll, a library for LLL-reduction of euclidean lattices")
  71. (description
  72. "fplll LLL-reduces euclidean lattices. Since version 3, it can also
  73. solve the shortest vector problem.")
  74. (license lgpl2.1+)
  75. (home-page "http://perso.ens-lyon.fr/damien.stehle/fplll/")))
  76. (define-public pari-gp
  77. (package
  78. (name "pari-gp")
  79. (version "2.5.5")
  80. (source (origin
  81. (method url-fetch)
  82. (uri (string-append
  83. "http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-"
  84. version ".tar.gz"))
  85. (sha256 (base32
  86. "058nw1fhggy7idii4f124ami521lv3izvngs9idfz964aks8cvvn"))))
  87. (build-system gnu-build-system)
  88. (inputs `(("gmp" ,gmp)
  89. ("perl" ,perl)
  90. ("readline" ,readline)))
  91. (arguments
  92. '(#:make-flags '("gp")
  93. ;; FIXME: building the documentation requires tex; once this is available,
  94. ;; replace "gp" by "all"
  95. #:test-target "dobench"
  96. #:phases
  97. (alist-replace
  98. 'configure
  99. (lambda* (#:key inputs outputs #:allow-other-keys)
  100. (let ((out (assoc-ref outputs "out"))
  101. (readline (assoc-ref inputs "readline"))
  102. (gmp (assoc-ref inputs "gmp")))
  103. (zero?
  104. (system* "./Configure"
  105. (string-append "--prefix=" out)
  106. (string-append "--with-readline=" readline)
  107. (string-append "--with-gmp=" gmp)))))
  108. ;; FIXME: readline and gmp will be detected automatically in the next
  109. ;; stable release
  110. %standard-phases)))
  111. (synopsis "PARI/GP, a computer algebra system for number theory")
  112. (description
  113. "PARI/GP is a widely used computer algebra system designed for fast
  114. computations in number theory (factorisations, algebraic number theory,
  115. elliptic curves...), but it also contains a large number of other useful
  116. functions to compute with mathematical entities such as matrices,
  117. polynomials, power series, algebraic numbers, etc., and a lot of
  118. transcendental functions.
  119. PARI is also available as a C library to allow for faster computations.")
  120. (license gpl2+)
  121. (home-page "http://pari.math.u-bordeaux.fr/")))
  122. (define-public gp2c
  123. (package
  124. (name "gp2c")
  125. (version "0.0.8")
  126. (source (origin
  127. (method url-fetch)
  128. (uri (string-append
  129. "http://pari.math.u-bordeaux.fr/pub/pari/GP2C/gp2c-"
  130. version ".tar.gz"))
  131. (sha256 (base32
  132. "03fgiwy2si264g3zfgw2yi6i2l8szl5m106zgwk77sddshk20b34"))))
  133. (build-system gnu-build-system)
  134. (inputs `(("pari-gp" ,pari-gp)))
  135. (arguments
  136. '(#:configure-flags
  137. (list (string-append "--with-paricfg="
  138. (assoc-ref %build-inputs "pari-gp")
  139. "/lib/pari/pari.cfg"))))
  140. (synopsis "PARI/GP, a computer algebra system for number theory")
  141. (description
  142. "PARI/GP is a widely used computer algebra system designed for fast
  143. computations in number theory (factorisations, algebraic number theory,
  144. elliptic curves...), but it also contains a large number of other useful
  145. functions to compute with mathematical entities such as matrices,
  146. polynomials, power series, algebraic numbers, etc., and a lot of
  147. transcendental functions.
  148. PARI is also available as a C library to allow for faster computations.
  149. GP2C, the GP to C compiler, translates GP scripts to PARI programs.")
  150. (license gpl2)
  151. (home-page "http://pari.math.u-bordeaux.fr/")))
  152. (define-public bc
  153. (package
  154. (name "bc")
  155. (version "1.06")
  156. (source (origin
  157. (method url-fetch)
  158. (uri (string-append "mirror://gnu/bc/bc-" version ".tar.gz"))
  159. (sha256
  160. (base32
  161. "0cqf5jkwx6awgd2xc2a0mkpxilzcfmhncdcfg7c9439wgkqxkxjf"))))
  162. (build-system gnu-build-system)
  163. (inputs `(("readline" ,readline)
  164. ("flex" ,flex)))
  165. (arguments
  166. '(#:phases
  167. (alist-replace 'configure
  168. (lambda* (#:key outputs #:allow-other-keys)
  169. ;; This old `configure' script doesn't support
  170. ;; variables passed as arguments.
  171. (let ((out (assoc-ref outputs "out")))
  172. (setenv "CONFIG_SHELL" (which "bash"))
  173. (zero?
  174. (system* "./configure"
  175. (string-append "--prefix=" out)))))
  176. %standard-phases)))
  177. (home-page "http://www.gnu.org/software/bc/")
  178. (synopsis "Arbitrary precision numeric processing language")
  179. (description
  180. "bc is an arbitrary precision numeric processing language. It includes
  181. an interactive environment for evaluating mathematical statements. Its
  182. syntax is similar to that of C, so basic usage is familiar. It also includes
  183. \"dc\", a reverse-polish calculator.")
  184. (license gpl2+)))
  185. (define-public fftw
  186. (package
  187. (name "fftw")
  188. (version "3.3.3")
  189. (source (origin
  190. (method url-fetch)
  191. (uri (string-append "ftp://ftp.fftw.org/pub/fftw/fftw-"
  192. version".tar.gz"))
  193. (sha256
  194. (base32
  195. "1wwp9b2va7vkq3ay7a9jk22nr4x5q6m37rzqy2j8y3d11c5grkc5"))))
  196. (build-system gnu-build-system)
  197. (arguments
  198. '(#:configure-flags '("--enable-shared" "--enable-openmp")
  199. #:phases (alist-cons-before
  200. 'build 'no-native
  201. (lambda _
  202. ;; By default '-mtune=native' is used. However, that may
  203. ;; cause the use of ISA extensions (SSE2, etc.) that are
  204. ;; not necessarily available on the user's machine when
  205. ;; that package is built on a different machine.
  206. (substitute* (find-files "." "Makefile$")
  207. (("-mtune=native") "")))
  208. %standard-phases)))
  209. (native-inputs `(("perl" ,perl)))
  210. (home-page "http://fftw.org")
  211. (synopsis "Computing the discrete Fourier transform")
  212. (description
  213. "FFTW is a C subroutine library for computing the discrete Fourier
  214. transform (DFT) in one or more dimensions, of arbitrary input size, and of
  215. both real and complex data (as well as of even/odd data---i.e. the discrete
  216. cosine/ sine transforms or DCT/DST).")
  217. (license gpl2+)))