18 #if !defined escript_UnaryFuncs_20041124_H 19 #define escript_UnaryFuncs_20041124_H 25 #define FP_NAN IEEE_NaN() 29 #define INFINITY IEEE_Infy() 39 return log(y) - ((y-1)-x)/y ;
47 static unsigned char nan[4]={ 0, 0, 0xc0, 0x7f };
48 return *(
float *)nan;
56 static unsigned char infy[8]={ 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
57 return *(
double *)infy;
63 #if defined (_WIN32) && !defined(__INTEL_COMPILER) 66 acosh_substitute (
const double x)
70 return log (x) +
M_LN2;
74 return log (2 * x - 1 / (sqrt (x * x - 1) + x));
79 return log1p (t + sqrt (2 * t + t * t));
96 asinh_substitute (
const double x)
99 double s = (x < 0) ? -1 : 1;
103 return s * (log (a) +
M_LN2);
107 return s * log (2 * a + 1 / (a + sqrt (a * a + 1)));
112 return s *
log1p (a + a2 / (1 + sqrt (1 + a2)));
125 atanh_substitute (
const double x)
128 double s = (x < 0) ? -1 : 1;
140 return s * 0.5 *
log1p (2 * a / (1 - a));
142 else if (a > DBL_EPSILON)
144 return s * 0.5 *
log1p (2 * a + 2 * a * a / (1 - a));
151 #endif // windows substitutes for stupid microsoft compiler. float IEEE_NaN()
Definition: UnaryFuncs.h:45
double log1p(const double x)
Definition: UnaryFuncs.h:35
#define M_LN2
Definition: escriptcore/src/system_dep.h:51
Definition: AbstractContinuousDomain.cpp:24
#define INFINITY
Definition: UnaryFuncs.h:29
double IEEE_Infy()
Definition: UnaryFuncs.h:54
#define FP_NAN
Definition: UnaryFuncs.h:25
#define SQRT_DBL_EPSILON
Definition: escriptcore/src/system_dep.h:47
double fsign(double x)
Definition: UnaryFuncs.h:156