a simple workaround for isinf needed by adms
This commit is contained in:
parent
e0ad9b13a4
commit
4ab0193271
|
|
@ -9,6 +9,7 @@ libmathmisc_la_SOURCES = \
|
|||
bernoull.c \
|
||||
erfc.c \
|
||||
equality.c \
|
||||
isinf.c \
|
||||
isnan.c \
|
||||
logb.c \
|
||||
scalb.c \
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
Loading…
Reference in New Issue