e_scalb.c: Call scalbln instead of scalbn on 16-bit targets to ensure constant fits in an int.
This commit is contained in:
parent
3017f23f1c
commit
fcc1e7039f
|
@ -46,8 +46,13 @@
|
|||
else return x/(-fn);
|
||||
}
|
||||
if (rint(fn)!=fn) return (fn-fn)/(fn-fn);
|
||||
#if INT_MAX == 32767
|
||||
if ( fn > 65000.0) return scalbln(x, 65000);
|
||||
if (-fn > 65000.0) return scalbln(x,-65000);
|
||||
#else
|
||||
if ( fn > 65000.0) return scalbn(x, 65000);
|
||||
if (-fn > 65000.0) return scalbn(x,-65000);
|
||||
#endif
|
||||
return scalbn(x,(int)fn);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue