+dnl -------------------------------------------------------------
+dnl See if the isfinite function is available in namespace std
+dnl (this function is C99 and therefore not part of C++98, but
+dnl some implementations provide it nevertheless).
+dnl
+dnl Usage: DEAL_II_CHECK_ISFINITE
+dnl
+dnl -------------------------------------------------------------
+AC_DEFUN(DEAL_II_CHECK_ISFINITE, dnl
+[
+ AC_MSG_CHECKING(for std::isfinite)
+ AC_LANG(C++)
+ CXXFLAGS=$CXXFLAGSG
+ AC_TRY_COMPILE(
+ [
+#include <cmath>
+ ],
+ [
+ double d=0;
+ std::isfinite (d);
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEAL_II_HAVE_ISFINITE, 1,
+ [Defined if std::isfinite is available])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
+])
+
+
+
+
+
dnl -------------------------------------------------------------
dnl rand_r is defined for some compiler flag combinations, but not for
dnl others. check that. note that since these are C++ flags, we can't
aclocal.m4 in the top-level directory. */
#undef DEAL_II_FUNPTR_TEMPLATE_TEMPLATE_BUG
+/* Defined if std::isfinite is available */
+#undef DEAL_II_HAVE_ISFINITE
+
/* Flag indicating whether the library shall be compiled to use the NetCDF
interface */
#undef DEAL_II_HAVE_NETCDF
* 1/sqrt(2)
*/
static const double SQRT1_2 = 0.70710678118654752440;
+
+ /**
+ * Return @p true if the given
+ * value is a finite floating point
+ * number, i.e. is neither plus or
+ * minus infinity nor NaN (not a
+ * number).
+ */
+ bool is_finite (const double x);
}
-#endif
#! /bin/sh
-# From configure.in Revision: 1.219 .
+# From configure.in Revision: 1.220 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for deal.II 5.3.pre.
#
+ echo "$as_me:$LINENO: checking for std::isfinite" >&5
+echo $ECHO_N "checking for std::isfinite... $ECHO_C" >&6
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ CXXFLAGS=$CXXFLAGSG
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <cmath>
+
+int
+main ()
+{
+
+ double d=0;
+ std::isfinite (d);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define DEAL_II_HAVE_ISFINITE 1
+_ACEOF
+
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
echo "$as_me:$LINENO: checking for rand_r" >&5
echo $ECHO_N "checking for rand_r... $ECHO_C" >&6
ac_ext=cc
DEAL_II_CHECK_ABORT
DEAL_II_CHECK_GETRUSAGE
DEAL_II_CHECK_ISNAN
+DEAL_II_CHECK_ISFINITE
DEAL_II_CHECK_RAND_R
DEAL_II_CHECK_QUAD_DEFINE
DEAL_II_CHECK_ERROR_CODES_DEFINITION
* 1/sqrt(2)
*/
static const double SQRT1_2 = 0.70710678118654752440;
+
+ /**
+ * Return @p true if the given
+ * value is a finite floating point
+ * number, i.e. is neither plus or
+ * minus infinity nor NaN (not a
+ * number).
+ */
+ bool is_finite (const double x);
}
-#endif
])
<ol>
+ <li> <p> New: The new <code
+ class="member">deal_II_numbers::is_finite</code> function can
+ be used to check whether a floating point number is finite,
+ i.e. neither plus or minus infinite nor NaN (not a number).
+ <br>
+ (WB 2006/03/15)
+ </p>
+
<li> <p> Improved: If the C++ runtime environment allows it, we now
demangle stacktraces generated whenever an exception is thrown.
<br>