diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-03-16 21:01:34 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-03-16 21:01:34 -0400 |
commit | 93a50a26cd0f9efc59cc83daae7b2d916b327ab1 (patch) | |
tree | ada41a23c4b01f27d1d2cf8cd88948b061aa8f61 /src/math/scalbf.c | |
parent | 2cbb24bba39ad3529315098b5619b6fec078eb82 (diff) | |
parent | 40305f74bd70a575ce73260227ed3b64e0625b13 (diff) | |
download | musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.tar.gz musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.tar.bz2 musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.tar.xz musl-93a50a26cd0f9efc59cc83daae7b2d916b327ab1.zip |
Merge remote branch 'nsz/master'
Diffstat (limited to 'src/math/scalbf.c')
-rw-r--r-- | src/math/scalbf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/scalbf.c b/src/math/scalbf.c index 0cc091f1..94364974 100644 --- a/src/math/scalbf.c +++ b/src/math/scalbf.c @@ -13,19 +13,19 @@ * ==================================================== */ -#include "libm.h" +#include <math.h> float scalbf(float x, float fn) { if (isnan(x) || isnan(fn)) return x*fn; if (!isfinite(fn)) { - if (fn > (float)0.0) + if (fn > 0.0f) return x*fn; else return x/(-fn); } if (rintf(fn) != fn) return (fn-fn)/(fn-fn); - if ( fn > (float)65000.0) return scalbnf(x, 65000); - if (-fn > (float)65000.0) return scalbnf(x,-65000); + if ( fn > 65000.0f) return scalbnf(x, 65000); + if (-fn > 65000.0f) return scalbnf(x,-65000); return scalbnf(x,(int)fn); } |