35 #ifdef POK_NEEDS_LIBMATH
38 #include "math_private.h"
42 __ieee754_scalb(
double x,
int fn)
45 __ieee754_scalb(
double x,
double fn)
51 if (isnan(x)||isnan(fn))
return x*fn;
53 if(fn>0.0)
return x*fn;
56 if (rint(fn)!=fn)
return (fn-fn)/(fn-fn);
57 if ( fn > 65000.0)
return scalbn(x, 65000);
58 if (-fn > 65000.0)
return scalbn(x,-65000);
59 return scalbn(x,(
int)fn);