Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/math/ef_hypot.c')
-rw-r--r--newlib/libm/math/ef_hypot.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/newlib/libm/math/ef_hypot.c b/newlib/libm/math/ef_hypot.c
index 9368eb41c..9f6d40c9c 100644
--- a/newlib/libm/math/ef_hypot.c
+++ b/newlib/libm/math/ef_hypot.c
@@ -41,8 +41,8 @@
if(FLT_UWORD_IS_INFINITE(hb)) w = b;
return w;
}
- /* scale a and b by 2**-68 */
- ha -= 0x22000000L; hb -= 0x22000000L; k += 68;
+ /* scale a and b by 2**-60 */
+ ha -= 0x5d800000L; hb -= 0x5d800000L; k += 60;
SET_FLOAT_WORD(a,ha);
SET_FLOAT_WORD(b,hb);
}
@@ -50,14 +50,14 @@
if(FLT_UWORD_IS_ZERO(hb)) {
return a;
} else if(FLT_UWORD_IS_SUBNORMAL(hb)) {
- SET_FLOAT_WORD(t1,0x7e800000L); /* t1=2^126 */
+ SET_FLOAT_WORD(t1,0x3f000000L); /* t1=2^126 */
b *= t1;
a *= t1;
k -= 126;
- } else { /* scale a and b by 2^68 */
- ha += 0x22000000; /* a *= 2^68 */
- hb += 0x22000000; /* b *= 2^68 */
- k -= 68;
+ } else { /* scale a and b by 2^60 */
+ ha += 0x5d800000; /* a *= 2^60 */
+ hb += 0x5d800000; /* b *= 2^60 */
+ k -= 60;
SET_FLOAT_WORD(a,ha);
SET_FLOAT_WORD(b,hb);
}