[cddlib] 01/01: Use GMP float instead of C double
Ximin Luo
infinity0 at debian.org
Thu Oct 13 10:29:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch _experiment_gmpfloat
in repository cddlib.
commit f76de112e7746877bed38b9234bfabb498e80a40
Author: Ximin Luo <infinity0 at debian.org>
Date: Thu Oct 13 12:18:37 2016 +0200
Use GMP float instead of C double
---
debian/changelog | 7 ++++++
debian/patches/series | 1 +
debian/patches/use-gmp-float.patch | 48 ++++++++++++++++++++++++++++++++++++++
3 files changed, 56 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 015c5bd..2142299 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cddlib (094h-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Use GMP float instead of C double.
+
+ -- Ximin Luo <infinity0 at debian.org> Thu, 13 Oct 2016 03:50:43 +0200
+
cddlib (094h-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/patches/series b/debian/patches/series
index a3f04aa..e18dbe3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
build_cdd_both_reps.patch
+use-gmp-float.patch
diff --git a/debian/patches/use-gmp-float.patch b/debian/patches/use-gmp-float.patch
new file mode 100644
index 0000000..708e828
--- /dev/null
+++ b/debian/patches/use-gmp-float.patch
@@ -0,0 +1,48 @@
+Description: Use GMP float instead of C double
+ Hopefully gives more accurate results
+Author: Ximin Luo <infinity0 at debian.org>
+Forwarded: TBD
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib-src/Makefile.am
++++ b/lib-src/Makefile.am
+@@ -15,5 +15,5 @@
+ cddtypes.h \
+ setoper.h
+
+-AM_CPPFLAGS = -UGMPRATIONAL
++AM_CPPFLAGS = -I$(gmpincludedir) -UGMPRATIONAL -DGMPFLOAT
+ AM_LDFLAGS = -version-info 0:0:0
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -32,5 +32,6 @@
+ # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
+
+ LDADD = ../lib-src/libcdd.la
+-INCLUDES = -I../lib-src
+-AM_CPPFLAGS = -UGMPRATIONAL
++AM_LDFLAGS = -L$(gmplibdir)
++INCLUDES = -I../lib-src -I$(gmpincludedir)
++AM_CPPFLAGS = -UGMPRATIONAL -DGMPFLOAT
+--- a/lib-src/cddmp.c
++++ b/lib-src/cddmp.c
+@@ -50,7 +50,7 @@
+ mpf_set_d(dd_zero,dd_almostzero);
+ mpf_set_ui(dd_purezero,0U);
+ mpf_set_ui(dd_one,1U);
+- mpf_set_si(dd_minusone,-1L,1U);
++ mpf_set_si(dd_minusone,-1L);
+ #else
+ dd_zero[0]= dd_almostzero; /*real zero */
+ dd_purezero[0]= 0.0;
+--- a/lib-src/cddmp.h
++++ b/lib-src/cddmp.h
+@@ -54,7 +54,7 @@
+ #define dd_set(a, b) mpf_set(a,b)
+ #define dd_set_d(a, b) mpf_set_d(a,b)
+ #define dd_set_si(a, b) mpf_set_si(a,b)
+- #define dd_set_si2(a, b, c) mpf_set_si(a,b,c) /* gmp 3.1 or higher */
++ #define dd_set_si2(a, b, c) mpf_set_si(a,b);mpf_div_ui(a,a,c) /* gmp 3.1 or higher */
+ #define dd_add(a, b, c) mpf_add(a,b,c)
+ #define dd_sub(a, b, c) mpf_sub(a,b,c)
+ #define dd_mul(a, b, c) mpf_mul(a,b,c)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cddlib.git
More information about the debian-science-commits
mailing list