summaryrefslogtreecommitdiffstats
path: root/modules/fdlibm/src/s_scalbn.cpp
diff options
context:
space:
mode:
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;