diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-15 15:17:01 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-11-15 15:17:01 +0100 |
commit | 5e902a4a9a25a9e151b5d3945c68517bc0c73139 (patch) | |
tree | a2e314bc193f4bdd52bb45adfc12f2803c265469 /modules/fdlibm/src/s_scalbn.cpp | |
parent | 6ca0b4704367f8804e0373cb439e6e17e5146e4a (diff) | |
download | UXP-5e902a4a9a25a9e151b5d3945c68517bc0c73139.tar UXP-5e902a4a9a25a9e151b5d3945c68517bc0c73139.tar.gz UXP-5e902a4a9a25a9e151b5d3945c68517bc0c73139.tar.lz UXP-5e902a4a9a25a9e151b5d3945c68517bc0c73139.tar.xz UXP-5e902a4a9a25a9e151b5d3945c68517bc0c73139.zip |
Issue #1291 - Part 3: Update fdlibm to Sept 2019 version
Diffstat (limited to 'modules/fdlibm/src/s_scalbn.cpp')
-rw-r--r-- | modules/fdlibm/src/s_scalbn.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/fdlibm/src/s_scalbn.cpp b/modules/fdlibm/src/s_scalbn.cpp index 5dbf58c23..dfbcf5c57 100644 --- a/modules/fdlibm/src/s_scalbn.cpp +++ b/modules/fdlibm/src/s_scalbn.cpp @@ -10,9 +10,8 @@ * ==================================================== */ -#ifndef lint -//static char rcsid[] = "$FreeBSD$"; -#endif +//#include <sys/cdefs.h> +//__FBSDID("$FreeBSD$"); /* * scalbn (double x, int n) @@ -21,7 +20,6 @@ * exponentiation or a multiplication. */ -//#include <sys/cdefs.h> #include <float.h> #include "math_private.h" @@ -50,10 +48,12 @@ scalbn (double x, int n) if (k > 0x7fe) return huge*copysign(huge,x); /* overflow */ if (k > 0) /* normal result */ {SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x;} - if (k <= -54) + if (k <= -54) { if (n > 50000) /* in case integer overflow in n+k */ return huge*copysign(huge,x); /*overflow*/ - else return tiny*copysign(tiny,x); /*underflow*/ + else + return tiny*copysign(tiny,x); /*underflow*/ + } k += 54; /* subnormal result */ SET_HIGH_WORD(x,(hx&0x800fffff)|(k<<20)); return x*twom54; |