isanan.c

Go to the documentation of this file.
00001 /* Copyright INRIA/ENPC */
00002 #include <stdio.h>
00003 #include <math.h>
00004 
00005 #include "machine.h"
00006 #include "Os_specific.h"
00007 
00008 
00009 #ifdef _MSC_VER 
00010         #define _ISANAN
00011         #include <float.h>
00012 #endif 
00013 
00014 
00015 /* testing Nan returns 1 if a Nan is found and 0 elsewhere */
00016 /* should be changed to use a libm isnan function when possible */
00017 
00018 integer C2F(isanan)(double *x)
00019 {
00020 #ifdef _ISANAN
00021   return(_isnan(*x)== 1);
00022 #else
00023   return((!( *x <= 1.0 )) && (!( *x >= 1.0 )));
00024 #endif
00025 }
00026 

Generated on Sun Mar 4 15:03:46 2007 for Scilab [trunk] by  doxygen 1.5.1