a simple workaround for isinf needed by adms

This commit is contained in:
dwarning 2009-01-04 11:17:42 +00:00
parent e0ad9b13a4
commit 4ab0193271
2 changed files with 27 additions and 0 deletions

View File

@ -9,6 +9,7 @@ libmathmisc_la_SOURCES = \
bernoull.c \
erfc.c \
equality.c \
isinf.c \
isnan.c \
logb.c \
scalb.c \

26
src/maths/misc/isinf.c Normal file
View File

@ -0,0 +1,26 @@
#include "ngspice.h"
/* this is really ugly - but it is a emergency case */
#ifndef HAVE_DECL_ISINF
#ifndef HAVE_ISINF
static int
isinf(double x)
{
volatile double a = x;
if (a > DBL_MAX)
return 1;
if (a < -DBL_MAX)
return -1;
return 0;
}
/*
* end isinf.c
*/
#else /* HAVE_ISINF */
int Dummy_Symbol_5;
#endif /* HAVE_ISINF */
#endif /* HAVE_DECL_ISINF */