[eclib] 01/02: Wrote a better patch for the numerical noise on armel
Julien Puydt
julien.puydt at laposte.net
Sun Nov 6 13:24:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository eclib.
commit 0fa5f7ffbe750d196301575f30331ec59dbe6806
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Sun Nov 6 10:33:48 2016 +0100
Wrote a better patch for the numerical noise on armel
---
debian/changelog | 6 +++++
debian/patches/armel.patch | 35 ++++++++++++++++++++++++++++
debian/patches/egr_bound_small_to_zero.patch | 16 -------------
debian/patches/series | 2 +-
4 files changed, 42 insertions(+), 17 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ef17872..28812ba 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+eclib (20160720-3) UNRELEASED; urgency=medium
+
+ * Wrote a better patch for the numerical noise on ARMEL.
+
+ -- Julien Puydt <julien.puydt at laposte.net> Sun, 06 Nov 2016 10:33:02 +0100
+
eclib (20160720-2) unstable; urgency=medium
* Marked libec-dev as Multi-Arch: same followin hinter's advice.
diff --git a/debian/patches/armel.patch b/debian/patches/armel.patch
new file mode 100644
index 0000000..31ac353
--- /dev/null
+++ b/debian/patches/armel.patch
@@ -0,0 +1,35 @@
+Description: gets around numerical noise on armel
+Author: Julien Puydt
+Forwarded: yes
+
+diff --git a/libsrc/htconst.cc b/libsrc/htconst.cc
+index f43e127..a3e44f8 100644
+--- a/libsrc/htconst.cc
++++ b/libsrc/htconst.cc
+@@ -108,7 +108,14 @@ double egr_height_constant(const Curvedata& CD)
+ {
+ double bd = cps_real(I2bigfloat(getb2(CD)),I2bigfloat(getb4(CD)),
+ I2bigfloat(getb6(CD)),I2bigfloat(getb8(CD)));
++
++#ifdef __ARMEL__
++ if (abs(bd) < 1e-30) bd = 0; // otherwise we get numerical noise
++#else
+ if (bd==0) bd=0; // otherwise the output sometimes prints as "-0"
++#endif
++
++ return bd;
+ }
+
+ double cps_bound(const Curvedata& CD)
+@@ -164,7 +171,11 @@ double cps_bound(const Curvedata& CD)
+ cout<<"sum so far = "<<bd<<endl;
+ #endif
+ }
++#ifdef __ARMEL__
++ if (abs(bd) < 1e-30) bd=0; // otherwise we get numerical noise
++#else
+ if (bd==0) bd=0; // otherwise the output sometimes prints as "-0"
++#endif
+ return bd;
+ }
+
diff --git a/debian/patches/egr_bound_small_to_zero.patch b/debian/patches/egr_bound_small_to_zero.patch
deleted file mode 100644
index 3c24bb2..0000000
--- a/debian/patches/egr_bound_small_to_zero.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Author: Julien Puydt
-Description: Set egr_bound to zero if it's small so tests pass
-Forwarded: yes
-
---- a/tests/thtconst.cc
-+++ b/tests/thtconst.cc
-@@ -76,6 +76,9 @@
- double cps = cps_bound(CD);
- cout << "CPS bound = " << cps << "\n";
- double egr_bound = egr_height_constant(CD);
-+ // numerical noise makes tests fail
-+ if (abs(egr_bound) < 1e-30)
-+ egr_bound = 0;
- cout << "egr bound = " << egr_bound << "\n";
- bigint k;
- Curvedata CD2=opt_x_shift(CD,k);
diff --git a/debian/patches/series b/debian/patches/series
index bdd3565..93d2885 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-egr_bound_small_to_zero.patch
+armel.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/eclib.git
More information about the debian-science-commits
mailing list