14 return std::isfinite( x );
21 return (mTYPE) c >= 1 ? 0 : (c <= -1 ? mTYPE(
M_PI) : acos( c ));
27 return (mTYPE) s >= 1 ? mTYPE(
M_PI_2)
28 : (s <= -1 ? -mTYPE(
M_PI_2) : asin( s ));
34 return (mTYPE) s <= 0 ?
mUdf(mTYPE) : log( s );
40 return (mTYPE) s <= 0 ?
mUdf(mTYPE) : log10( s );
48 return (mTYPE) s <= 0 ? 0 : sqrt ( s );
53 return (mTYPE) s <= 0 ?
mUdf(mTYPE) : 20*log10( s );
63 return (mTYPE) (y ? 0 : 1);
65 const bool isneg = x < 0 ? 1 : 0;
68 mTYPE ret = exp( y * log(x) );
69 return isneg ? -ret : ret;
79 return y ? (mTYPE)0 : (mTYPE)1;
81 if ( x > 1.5 || x < -1.5 )
83 if ( y > 150 )
return mUdf(mTYPE);
84 if ( y < -150 )
return (mTYPE) 0;
85 if ( x > 1.99 || x < -1.99 )
87 if ( y > 100 )
return mUdf(mTYPE);
88 if ( y < -100 )
return (mTYPE) 0;
91 else if ( x < 0.5 && x > -0.5 )
93 if ( y > 100 )
return (mTYPE) 0;
94 if ( y < -100 )
return (mTYPE) 1;
114 double xx = (mTYPE)x;
119 while ( ds > s * DBL_EPSILON )
float PowerOf(float, float)
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
#define M_PI
Definition: commondefs.h:64
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
#define finite
Definition: msvcdefs.h:42
#define M_PI_2
Definition: commondefs.h:73
bool IsNormalNumber(float)
iT IntPowerOf(iT i, iPOW p)
Definition: math2.h:122