From 5e902a4a9a25a9e151b5d3945c68517bc0c73139 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 15 Nov 2019 15:17:01 +0100 Subject: Issue #1291 - Part 3: Update fdlibm to Sept 2019 version --- modules/fdlibm/src/s_scalbn.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/fdlibm/src/s_scalbn.cpp') 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 +//__FBSDID("$FreeBSD$"); /* * scalbn (double x, int n) @@ -21,7 +20,6 @@ * exponentiation or a multiplication. */ -//#include #include #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; -- cgit v1.2.3