[libmatheval] 03/03: revert 1.1.11+dfsg-1.2

Julian Taylor jtaylor.debian at googlemail.com
Sun Oct 26 02:19:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

jtaylor-guest pushed a commit to branch master
in repository libmatheval.

commit 9841517c1175121b6e2c199f315478c544a477fb
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date:   Sun Oct 26 02:26:19 2014 +0100

    revert 1.1.11+dfsg-1.2
    
    instead of truncating results, disable the test that has an error of 1 ulp
---
 debian/changelog                           |  7 +++
 debian/libmatheval1.symbols                |  1 -
 debian/patches/004-arch-optimisation.patch | 73 ------------------------------
 debian/patches/disable_coth_test.patch     | 25 ++++++++++
 debian/patches/series                      |  2 +-
 5 files changed, 33 insertions(+), 75 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b6c68d6..416f123 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libmatheval (1.1.11+dfsg-2) unstable; urgency=medium
+
+  * revert 1.1.11+dfsg-1.2
+    instead of truncating results, disable the test that has an error of 1 ulp
+
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Sun, 26 Oct 2014 03:09:25 +0100
+
 libmatheval (1.1.11+dfsg-1.2) unstable; urgency=low
 
   * Non-maintainer upload.
diff --git a/debian/libmatheval1.symbols b/debian/libmatheval1.symbols
index 8090a80..b50aba3 100644
--- a/debian/libmatheval1.symbols
+++ b/debian/libmatheval1.symbols
@@ -48,7 +48,6 @@ libmatheval.so.1 libmatheval1 #MINVER#
  math_sec at Base 1.1.3
  math_sech at Base 1.1.3
  math_step at Base 1.1.3
- math_truncate15 at Base 1.1.11
  node_copy at Base 1.1.3
  node_create at Base 1.1.3
  node_derivative at Base 1.1.3
diff --git a/debian/patches/004-arch-optimisation.patch b/debian/patches/004-arch-optimisation.patch
deleted file mode 100644
index dac62ad..0000000
--- a/debian/patches/004-arch-optimisation.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-Description: Compiler optimisation affects on floating point tests.
- Truncate the precision of a returned double to 15 places.
- This allows for compiler optimisations which may change the
- comparison of floating point numbers on particular architectures.
- .
- libmatheval (1.1.11+dfsg-1.2) unstable; urgency=low
- .
-   * Non-maintainer upload.
-   * Add a fix to lib/xmath.c to limit the precision to
-     within the range compatible with the current compiler
-     optimisations so that the uncertain process of comparing
-     floating point numbers can be used in the test suite.
-     Completes the migration to guile-2.0 (Closes: #746013)
-Author: Dave Pigott <dave.pigott at linaro.org>
-Bug-Debian: https://bugs.debian.org/746013
-
----
-
---- libmatheval-1.1.11+dfsg.orig/lib/xmath.c
-+++ libmatheval-1.1.11+dfsg/lib/xmath.c
-@@ -19,8 +19,32 @@
-  * <http://www.gnu.org/licenses/>.
-  */
- 
-+#include <stdio.h>
- #include "xmath.h"
- 
-+
-+double
-+math_truncate15(double x)
-+{
-+	/* 
-+	 * Truncate the precision of a returned double to 15 decimal places
-+	 * This is hacky, and as at the time of writing, is only required for
-+	 * the "coth" function, which due to optimisation and floating point
-+	 * width, gives a different result on i386 to all other platforms
-+	 * At the moment we're dealing with an explicit 15 significant digits.
-+	 * This could be generalised to a "give me n digits of precision" type
-+	 * solution
-+	 */
-+	double d;
-+	char s[128];
-+
-+	sprintf(s, "%.15f", x);
-+	sscanf(s, "%lf", &d);
-+
-+	return d; 
-+}
-+
-+
- double
- math_cot(double x)
- {
-@@ -81,7 +105,7 @@ math_coth(double x)
- 	/* 
- 	 * Calculate hyperbolic cotangent value.
- 	 */
--	return 1 / tanh(x);
-+	return math_truncate15(1 / tanh(x));
- }
- 
- double
---- libmatheval-1.1.11+dfsg.orig/tests/functions.at
-+++ libmatheval-1.1.11+dfsg/tests/functions.at
-@@ -335,7 +335,7 @@ AT_DATA([function.scm],
- (display (evaluator-evaluate-x f 1))
- ]])
- 
--AT_CHECK([matheval.sh function.scm], [ignore], [1.3130352854993315], [ignore])
-+AT_CHECK([matheval.sh function.scm], [ignore], [1.313035285499331], [ignore])
- 
- AT_DATA([function.scm],
- [[
diff --git a/debian/patches/disable_coth_test.patch b/debian/patches/disable_coth_test.patch
new file mode 100644
index 0000000..ce22093
--- /dev/null
+++ b/debian/patches/disable_coth_test.patch
@@ -0,0 +1,25 @@
+Index: libmatheval/tests/functions.at
+===================================================================
+--- libmatheval.orig/tests/functions.at
++++ libmatheval/tests/functions.at
+@@ -329,13 +329,13 @@ AT_DATA([function.scm],
+ 
+ AT_CHECK([matheval.sh function.scm], [ignore], [(1/(cosh(x)^2))], [ignore])
+ 
+-AT_DATA([function.scm],
+-[[
+-(define f (evaluator-create "coth(x)"))
+-(display (evaluator-evaluate-x f 1))
+-]])
+-
+-AT_CHECK([matheval.sh function.scm], [ignore], [1.3130352854993315], [ignore])
++# AT_DATA([function.scm],
++# [[
++# (define f (evaluator-create "coth(x)"))
++# (display (evaluator-evaluate-x f 1))
++# ]])
++# 
++# AT_CHECK([matheval.sh function.scm], [ignore], [1.3130352854993315], [ignore])
+ 
+ AT_DATA([function.scm],
+ [[
diff --git a/debian/patches/series b/debian/patches/series
index 9e40121..1e15db1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
 002-skip-docs.patch
 003-guile2.0.patch
-004-arch-optimisation.patch
+disable_coth_test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/libmatheval.git



More information about the debian-science-commits mailing list