[Pkg-ocaml-maint-commits] [SCM] ocaml-zarith packaging branch, master, updated. debian/1.0-5-4-gf76ff59

Mehdi Dogguy mehdi at debian.org
Sat Mar 24 09:34:50 UTC 2012


The following commit has been merged in the master branch:
commit ead30a913b2f862e8c6d62525842c0f056f0aa8c
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Sat Mar 24 10:18:32 2012 +0100

    Add patch from upstream's repository
    
    * Add patch from upstream's repository:
      - 0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch

diff --git a/debian/changelog b/debian/changelog
index 195a248..f14067b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
 ocaml-zarith (1.0-6) UNRELEASED; urgency=low
 
   * Don't run test-suite if DEB_BUILD_OPTIONS contains "nocheck".
+  * Add patch from upstream's repository:
+    - 0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch
 
- -- Mehdi Dogguy <mehdi at debian.org>  Fri, 10 Feb 2012 18:00:05 +0100
+ -- Mehdi Dogguy <mehdi at debian.org>  Sat, 24 Mar 2012 10:10:35 +0100
 
 ocaml-zarith (1.0-5) unstable; urgency=low
 
diff --git a/debian/patches/0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch b/debian/patches/0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch
new file mode 100644
index 0000000..7c1aea8
--- /dev/null
+++ b/debian/patches/0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch
@@ -0,0 +1,29 @@
+From 5acb95c9e2dac398910f0431c399c5e8467ace50 Mon Sep 17 00:00:00 2001
+From: antoinemine <antoinemine at 198b03b0-60d5-47cb-a09e-f81db6e26457>
+Date: Fri, 23 Mar 2012 20:45:52 +0000
+Subject: [PATCH] Fixed 1-bit precision loss when converting doubles to
+ rationals. Thanks to Andres Varon.
+
+git-svn-id: svn://scm.ocamlcore.org/svn/zarith/trunk@56 198b03b0-60d5-47cb-a09e-f81db6e26457
+---
+ q.ml |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/q.ml b/q.ml
+index 8809e98..90b7c77 100644
+--- a/q.ml
++++ b/q.ml
+@@ -82,8 +82,8 @@ let of_float d =
+   if d = neg_infinity then minus_inf else
+   if classify_float d = FP_nan then undef else
+   let m,e = frexp d in
+-  (* pu in the form  m * 2^e, where m is an integer *)
+-  let m,e = Z.of_float (ldexp m 52), e-52 in
++  (* put into the form m * 2^e, where m is an integer *)
++  let m,e = Z.of_float (ldexp m 53), e-53 in
+   if e >= 0 then of_bigint (Z.shift_left m e)
+   else make m (Z.shift_left Z.one (-e))
+ 
+-- 
+1.7.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index f867c60..22e1756 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 0004-ocamlopt-is-not-really-required.patch
 0005-Detect-more-arch-triplets.patch
 0006-Use-memcpy-instead-of-cast-ing.patch
+0007-Fixed-1-bit-precision-loss-when-converting-doubles-t.patch

-- 
ocaml-zarith packaging



More information about the Pkg-ocaml-maint-commits mailing list