[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: isnan in fortran
From: |
c. |
Subject: |
Re: isnan in fortran |
Date: |
Wed, 11 Apr 2012 13:37:42 +0200 |
On 11 Apr 2012, at 13:24, John W. Eaton wrote:
> Uh, except that I have the test and some syntax wrong. How about
>
> logical function isnan (x)
> double precision x
> isnan = x .ne. x
> return
> end
>
> jwe
OK, so what about the configure test below?
How do I get to add misc/isnan.f to the list of files to compile if the test
fails?
c.
diff -r b2bf5896ab51 configure.ac
--- a/configure.ac Mon Apr 09 21:11:18 2012 +0200
+++ b/configure.ac Wed Apr 11 13:32:32 2012 +0200
@@ -593,6 +593,8 @@
AC_MSG_ERROR([in order to build octave, you must have a compatible Fortran
compiler or wrapper script for f2c that functions as a Fortran compiler
installed and in your path. See the file INSTALL for more information.])
fi
+OCTAVE_CHECK_FORTRAN_HAVE_ISNAN
+
OCTAVE_CHECK_FORTRAN_INTEGER_SIZE
if test "x$octave_cv_fortran_integer_size" = xno; then
if $USE_64_BIT_IDX_T; then
diff -r b2bf5896ab51 m4/acinclude.m4
--- a/m4/acinclude.m4 Mon Apr 09 21:11:18 2012 +0200
+++ b/m4/acinclude.m4 Wed Apr 11 13:32:32 2012 +0200
@@ -329,6 +329,29 @@
fi
])
dnl
+dnl Check to see whether Fortran compiler has the intrinsic function ISNAN.
+dnl
+AC_DEFUN([OCTAVE_CHECK_FORTRAN_HAVE_ISNAN], [
+ AC_LANG_PUSH(Fortran 77)
+dnl AC_CACHE_CHECK
+dnl (
+dnl [whether $F77 has the intrinsic function ISNAN]
+dnl ,
+dnl [octave_cv_fortran_have_isnan]
+dnl ,
+dnl [
+ AC_COMPILE_IFELSE(
+[ program foo
+ double precision x
+ logical y
+ y = isnan(x)
+ end], [AC_DEFINE([HAVE_FORTRAN_ISNAN], [1], [Define to 1 if your fortran
compiler has ISNAN.])],
+ )
+dnl ]
+dnl )
+ AC_LANG_POP(Fortran 77)
+])
+dnl
dnl Check to see whether the default Fortran INTEGER is 64 bits wide.
dnl
AC_DEFUN([OCTAVE_CHECK_FORTRAN_INTEGER_SIZE], [
- Re: isnan in fortran, (continued)
Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, John W. Eaton, 2012/04/11
- Re: isnan in fortran, John W. Eaton, 2012/04/11
- Re: isnan in fortran, Michael Goffioul, 2012/04/11
- Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, Michael Goffioul, 2012/04/11
- Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran,
c. <=
Re: isnan in fortran, Mike Miller, 2012/04/11
Re: isnan in fortran, John W. Eaton, 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, Mike Miller, 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, John W. Eaton, 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, Jordi GutiƩrrez Hermoso, 2012/04/11
Re: isnan in fortran, c., 2012/04/11