summaryrefslogtreecommitdiffstats
path: root/lib/msun/src/s_scalbn.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msun/src/s_scalbn.c')
-rw-r--r--lib/msun/src/s_scalbn.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/msun/src/s_scalbn.c b/lib/msun/src/s_scalbn.c
index e7efaab..b048b05 100644
--- a/lib/msun/src/s_scalbn.c
+++ b/lib/msun/src/s_scalbn.c
@@ -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 @@ static char rcsid[] = "$FreeBSD$";
* exponentiation or a multiplication.
*/
-#include <sys/cdefs.h>
#include <float.h>
#include "math.h"
@@ -51,10 +49,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;
OpenPOWER on IntegriCloud