ngspice/src/include/missing_math.h

50 lines
911 B
C
Raw Normal View History

2000-04-27 22:03:57 +02:00
/**********
Copyright 1999 Emmanuel Rouat
**********/
/* Decl. for missing maths functions, if any */
2007-11-21 18:05:51 +01:00
#ifndef MISSING_MATH_H_INCLUDED
#define MISSING_MATH_H_INCLUDED
2008-01-02 19:52:04 +01:00
bool AlmostEqualUlps(double, double, int);
2000-04-27 22:03:57 +02:00
#ifndef HAVE_ERFC
extern double erfc(double);
#endif
#ifndef HAVE_LOGB
extern double logb(double);
#endif
#ifndef HAVE_SCALB
2008-11-19 20:57:27 +01:00
extern double scalb(double, double);
2000-04-27 22:03:57 +02:00
#endif
2008-11-19 20:57:27 +01:00
#ifndef HAVE_SCALBN
extern double scalbn(double, int);
2000-04-27 22:03:57 +02:00
#endif
2009-01-01 21:44:49 +01:00
#ifndef HAVE_DECL_ISNAN
#ifndef HAVE_ISNAN
extern int isnan(double);
#endif
2009-01-01 21:44:49 +01:00
#endif
2009-01-04 21:36:25 +01:00
#if (HAVE_DECL_ISINF < 1)
2009-01-04 14:23:58 +01:00
#ifndef HAVE_ISINF
2009-01-04 21:36:25 +01:00
#if defined(HAVE_FINITE) && ((HAVE_DECL_ISNAN < 1) || defined (HAVE_ISNAN))
2009-01-04 14:23:58 +01:00
#define isinf(x) (!finite(x) && !isnan(x))
#else
#ifdef HAVE_IEEEFP_H
extern int isinf(double);
2009-01-01 21:44:49 +01:00
#endif
2009-01-04 14:23:58 +01:00
#endif
#else /* HAVE_ISINF */
extern int isinf(double);
#endif /* HAVE_ISINF */
#endif /* HAVE_DECL_ISINF */
2007-11-21 18:05:51 +01:00
#endif /* MISSING_MATH_H_INCLUDED */