guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#48785] [PATCH v3 1/3] gnu: Add fast-double-parser.


From: Vinicius Monego
Subject: [bug#48785] [PATCH v3 1/3] gnu: Add fast-double-parser.
Date: Fri, 8 Oct 2021 02:54:07 +0000

* gnu/packages/cpp.scm (fast-double-parser): New variable.
---
Changed string to @code{} in description.

 gnu/packages/cpp.scm | 38 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 4af71ba93a..4a8cd3a120 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
-;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
@@ -331,6 +331,42 @@ functions, class methods, and stl containers.
 @end enumerate\n")
     (license license:bsd-3)))
 
+(define-public fast-double-parser
+  (package
+    (name "fast-double-parser")
+    (version "0.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/lemire/fast_double_parser";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "10mfpy4i7lpavghb15s4d0920nlwsac1ri2sxkcqbrj9iq94qj71"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'install ;no install target, have to do it manually
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out-include (string-append (assoc-ref outputs "out")
+                                               "/include")))
+               (mkdir-p out-include)
+               (copy-file "../source/include/fast_double_parser.h"
+                          (string-append out-include
+                                         "/fast_double_parser.h"))))))))
+    (home-page "https://github.com/lemire/fast_double_parser";)
+    (synopsis "Parse strings into double (binary64) floating-point values")
+    (description "Fast function to parse strings containing decimal numbers
+into double-precision (binary64) floating-point values.  That is, given the
+string @code{1.0e10}, it should return a 64-bit floating-point value equal to
+10000000000.  The function will match exactly (down the smallest bit) the
+result of a standard function like @code{strtod}.")
+    ;; Dual-licensed, either license applies.
+    (license (list license:asl2.0
+                   license:boost1.0))))
+
 (define-public fifo-map
   (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9")
          (revision "0")
-- 
2.30.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]