aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2016-09-28 14:48:34 +0000
committerEd Maste <emaste@FreeBSD.org>2016-09-28 14:48:34 +0000
commitdcdfa506cc92dedc9e4189d6ee2d33171914532d (patch)
tree8cf16d91b745a3f8930fe536ac58c0165db28a96
parent3af5cc2e50d00665c05a0d89626cbcae6f49cbdf (diff)
Notes
-rw-r--r--lib/msun/src/s_fabs.c5
-rw-r--r--lib/msun/src/s_logbl.c5
-rw-r--r--lib/msun/src/s_scalbn.c12
-rw-r--r--lib/msun/src/s_scalbnf.c11
-rw-r--r--lib/msun/src/s_scalbnl.c12
5 files changed, 21 insertions, 24 deletions
diff --git a/lib/msun/src/s_fabs.c b/lib/msun/src/s_fabs.c
index 15529e58576fa..48aab252db3cf 100644
--- a/lib/msun/src/s_fabs.c
+++ b/lib/msun/src/s_fabs.c
@@ -10,9 +10,8 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD$";
-#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* fabs(x) returns the absolute value of x.
diff --git a/lib/msun/src/s_logbl.c b/lib/msun/src/s_logbl.c
index 7e88e36f6ab40..ee1a91fd83858 100644
--- a/lib/msun/src/s_logbl.c
+++ b/lib/msun/src/s_logbl.c
@@ -10,9 +10,8 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD$";
-#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <float.h>
#include <limits.h>
diff --git a/lib/msun/src/s_scalbn.c b/lib/msun/src/s_scalbn.c
index e7efaabbf5594..b048b0596b67a 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;
diff --git a/lib/msun/src/s_scalbnf.c b/lib/msun/src/s_scalbnf.c
index 7666c74ab22c2..21d001c1faf14 100644
--- a/lib/msun/src/s_scalbnf.c
+++ b/lib/msun/src/s_scalbnf.c
@@ -13,11 +13,8 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD$";
-#endif
-
#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "math.h"
#include "math_private.h"
@@ -46,10 +43,12 @@ scalbnf (float x, int n)
if (k > 0xfe) return huge*copysignf(huge,x); /* overflow */
if (k > 0) /* normal result */
{SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23)); return x;}
- if (k <= -25)
+ if (k <= -25) {
if (n > 50000) /* in case integer overflow in n+k */
return huge*copysignf(huge,x); /*overflow*/
- else return tiny*copysignf(tiny,x); /*underflow*/
+ else
+ return tiny*copysignf(tiny,x); /*underflow*/
+ }
k += 25; /* subnormal result */
SET_FLOAT_WORD(x,(ix&0x807fffff)|(k<<23));
return x*twom25;
diff --git a/lib/msun/src/s_scalbnl.c b/lib/msun/src/s_scalbnl.c
index fc89f8d8ac5d0..28b0cf9b7294d 100644
--- a/lib/msun/src/s_scalbnl.c
+++ b/lib/msun/src/s_scalbnl.c
@@ -10,9 +10,8 @@
* ====================================================
*/
-#ifndef lint
-static char rcsid[] = "$FreeBSD$";
-#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
/*
* scalbnl (long double x, int n)
@@ -27,7 +26,6 @@ static char rcsid[] = "$FreeBSD$";
* for scalbn(), so we don't use this routine.
*/
-#include <sys/cdefs.h>
#include <float.h>
#include <math.h>
@@ -59,10 +57,12 @@ scalbnl (long double x, int n)
if (k >= 0x7fff) return huge*copysignl(huge,x); /* overflow */
if (k > 0) /* normal result */
{u.bits.exp = k; return u.e;}
- if (k <= -128)
+ if (k <= -128) {
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 += 128; /* subnormal result */
u.bits.exp = k;
return u.e*0x1p-128;