summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/src/s_scalbn.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-15 17:37:54 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-15 17:37:54 -0500
commit556349010e01d0a3b7896f858d503781ea837b46 (patch)
treef003183732dc3cda4ad880407880da282ca4b0c5 /modules/fdlibm/src/s_scalbn.cpp
parentf3d462c6049bd2f35571c2a0e2a7c4df4f3ca81c (diff)
parent3492ad65236209e741ca3641789efeaa22a6b8a4 (diff)
downloadUXP-556349010e01d0a3b7896f858d503781ea837b46.tar
UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.gz
UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.lz
UXP-556349010e01d0a3b7896f858d503781ea837b46.tar.xz
UXP-556349010e01d0a3b7896f858d503781ea837b46.zip
Merge branch 'master' into mailnews-work
Diffstat (limited to 'modules/fdlibm/src/s_scalbn.cpp')
-rw-r--r--modules/fdlibm/src/s_scalbn.cpp12
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;