Browse Source

a simple workaround for isinf needed by adms

pre-master-46
dwarning 17 years ago
parent
commit
4ab0193271
  1. 1
      src/maths/misc/Makefile.am
  2. 26
      src/maths/misc/isinf.c

1
src/maths/misc/Makefile.am

@ -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

@ -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…
Cancel
Save