diff mbox series

[bug#67384] gnu: Add perl-math-sigfig.

Message ID 4bab73d3e693747aa1ad12b58dba5c66746d2df4.1700680858.git.hrn@posteo.net
State New
Headers show
Series [bug#67384] gnu: Add perl-math-sigfig. | expand

Commit Message

hrn Nov. 22, 2023, 7:21 p.m. UTC
* gnu/packages/perl-maths.scm (perl-math-sigfig): New variable.

Change-Id: Ied8b274cb68a8b1e0afb436552679a04d600e04e
---
 gnu/packages/perl-maths.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)


base-commit: 23627b1706af25a0a30b96b9169a3495279aff1b
diff mbox series

Patch

diff --git a/gnu/packages/perl-maths.scm b/gnu/packages/perl-maths.scm
index b317e3c1cf..df01d3ac9a 100644
--- a/gnu/packages/perl-maths.scm
+++ b/gnu/packages/perl-maths.scm
@@ -21,6 +21,7 @@  (define-module (gnu packages perl-maths)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system perl)
+  #:use-module (guix git-download)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-check))
 
@@ -48,6 +49,31 @@  (define-public perl-math-cephes
 150 functions of the Cephes math library.")
     (license license:perl-license)))
 
+(define-public perl-math-sigfigs
+  (package
+    (name "perl-math-sigfigs")
+    (version "1.21")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/SBECK-github/Math-SigFigs")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "11fzn559s77cq82yddq4bgqjfan2c85cn42l2p30gnrnqrmsbg0l"))))
+    (build-system perl-build-system)
+    (native-inputs (list perl-test-inter perl-test-pod perl-test-pod-coverage
+                         perl-file-find-rule))
+    (home-page "https://metacpan.org/pod/Math::SigFigs")
+    (synopsis "Math with correct handling of significant figures")
+    (description
+     "@code{Math::SigFigs} contains routines for correct handling of
+significant figures.  It can handle real number or exponentials correctly.
+It can count the number of significant figures, format a number to a given
+number of significant figures, and do basic arithmetic.")
+    (license license:perl-license)))
+
 (define-public perl-math-matrixreal
   (package
     (name "perl-math-matrixreal")