[nfft] 01/07: New upstream version 3.4.0~rc2
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Fri Sep 29 13:16:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository nfft.
commit 2623985dee29a05e1b1731e22c6afda421177236
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Thu Sep 28 11:15:41 2017 +0100
New upstream version 3.4.0~rc2
---
applications/Makefile.am | 4 ++--
configure.ac | 19 ++++++++++---------
m4/ax_eps_def.m4 | 25 +++++++++++++++++--------
3 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/applications/Makefile.am b/applications/Makefile.am
index ddff97f..d9d294b 100644
--- a/applications/Makefile.am
+++ b/applications/Makefile.am
@@ -1,7 +1,7 @@
if HAVE_NFSFT
DIR_FASTSUMS2=fastsumS2
DIR_QUADRATURES2=quadratureS2
- DIR_ITERS2=iterS2
+ DIR_ITERS2=
else
DIR_FASTSUMS2=
DIR_QUADRATURES2=
@@ -15,7 +15,7 @@ else
endif
DIST_SUBDIRS = fastgauss fastsum fastsumS2 mri polarFFT \
- quadratureS2 radon iterS2
+ quadratureS2 radon
SUBDIRS= fastgauss fastsum $(DIR_FASTSUMS2) $(DIR_MRI) polarFFT \
$(DIR_QUADRATURES2) radon $(DIR_ITERS2)
diff --git a/configure.ac b/configure.ac
index f2e4b07..4935b0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -551,25 +551,25 @@ fi
# Calculate machine epsilon for selected precision.
AX_EPS_CALC([$PRECISION])
-# Get machine epsilon as per float.h.
+# Get machine epsilon by 2^(1-MAND_DIG) for selected precision per float.h.
AX_EPS_DEF([$PRECISION])
-if test "$ax_cv_eps_calc" = "unknown"; then
- if test "$ax_cv_eps_def" = "unknown"; then
+if test "$ax_cv_eps_def" = "unknown"; then
+ if test "$ax_cv_eps_calc" = "unknown"; then
# Calculation has failed and unable to get from float.h.
AC_MSG_ERROR([Unable to determine floating-point epsilon.])
else
- # Unable to calculate but have value in float.h.
- AC_MSG_WARN([Unable to calculate floating-point epsilon. Using pre-defined value from macro.])
- AC_DEFINE_UNQUOTED([NFFT_EPSILON], [$ax_cv_eps_def], [Floating-point epsilon.])
+ # Unable to get value in float.h but have our calculation.
+ AC_MSG_WARN([Unable to get floating-point epsilon from macro. Using our calculation.])
+ AC_DEFINE_UNQUOTED([NFFT_EPSILON], [$ax_cv_eps_calc], [Floating-point epsilon.])
fi
else
if test "$ax_cv_eps_calc" != "$ax_cv_eps_def"; then
# Calculated epsilon different from float.h.
- AC_MSG_WARN([Calculated epsilon "$ax_cv_eps_calc" and epsilon from macro "$ax_cv_eps_def" differ. Using calculated value.])
+ AC_MSG_WARN([Calculated epsilon "$ax_cv_eps_calc" and epsilon from macro "$ax_cv_eps_def" differ. Using macro-defined value.])
fi
# Calculated and pre-defined values identical.
- AC_DEFINE_UNQUOTED([NFFT_EPSILON], [$ax_cv_eps_calc], [Floating-point epsilon.])
+ AC_DEFINE_UNQUOTED([NFFT_EPSILON], [$ax_cv_eps_def], [Floating-point epsilon.])
fi
# CUnit
@@ -631,7 +631,6 @@ AC_CONFIG_FILES(Makefile \
applications/radon/Makefile \
applications/radon/inverse_radon.c \
applications/radon/radon.c \
- applications/iterS2/Makefile \
matlab/Makefile \
matlab/nfsft/Makefile \
matlab/nfft/Makefile \
@@ -643,5 +642,7 @@ AC_CONFIG_FILES(Makefile \
matlab/nfsoft/Makefile \
doxygen/Makefile \
support/Makefile)
+# temproarily removed:
+# applications/iterS2/Makefile \
AC_OUTPUT
diff --git a/m4/ax_eps_def.m4 b/m4/ax_eps_def.m4
index 8d782c6..11fb161 100644
--- a/m4/ax_eps_def.m4
+++ b/m4/ax_eps_def.m4
@@ -15,8 +15,8 @@
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# @synopsis AX_EPS_DEF
-# @summary Dtermine machine epsilon for given floating-point type (d = double,
-# f = float, l = long double) from corresponding macro defined in float.h.
+# @summary Determine machine epsilon for given floating-point type (d = double,
+# f = float, l = long double) from 2^(1-MAND_DIG) defined in float.h.
# @category C
#
# @version 2017-08-13
@@ -25,28 +25,37 @@
AC_DEFUN([AX_EPS_DEF],
[AC_REQUIRE([AC_PROG_CC])
AC_LANG_PUSH([C])
-AC_CACHE_CHECK(for floating-point epsilon as per macro, ax_cv_eps_def,
+AC_CACHE_CHECK(for floating-point epsilon as per length of mantissa, ax_cv_eps_def,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>
#include <float.h>
#define d 1
#define l 2
#define s 3
#define PRECISION $1
-
+
#if PRECISION == 1
+typedef double R;
#define __FE__ "%.16lE"
-#define EPSILON DBL_EPSILON
+#define K(x) ((R) x)
+#define MANT_DIG DBL_MANT_DIG
#elif PRECISION == 2
+typedef long double R;
#define __FE__ "%.32LE"
-#define EPSILON LDBL_EPSILON
+#define K(x) ((R) x##L)
+#define MANT_DIG LDBL_MANT_DIG
#elif PRECISION == 3
+typedef float R;
#define __FE__ "%.8E"
-#define EPSILON FLT_EPSILON
+#define K(x) ((R) x)
+#define MANT_DIG FLT_MANT_DIG
#else
#error "Unknown floating-point precision."
#endif], [ FILE *f;
f = fopen("conftest_eps_def", "w"); if (!f) return 1;
- fprintf(f, __FE__ "\n", EPSILON);
+ R epsilon = K(1.0);
+ for (int i=0; i<MANT_DIG-1; i++)
+ epsilon /= K(2.0);
+ fprintf(f, __FE__ "\n", epsilon);
fclose(f);
return 0;])],
[ax_cv_eps_def=`cat conftest_eps_def`; rm -f conftest_eps_def],
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/nfft.git
More information about the debian-science-commits
mailing list