author | Szabolcs Nagy <nsz@port70.net> | 2019年10月13日 14:54:31 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019年10月13日 17:46:58 -0400 |
commit | e858063070eedb7fe78c37eba5177d8c5cfccfa6 (patch) | |
tree | 096107b70bf29ed69cdb761894a91c230b885fa7 /src | |
parent | 716745e00e304a650a8eef57c15fbd326168096e (diff) | |
download | musl-e858063070eedb7fe78c37eba5177d8c5cfccfa6.tar.gz |
-rw-r--r-- | src/math/sqrt.c | 3 | ||||
-rw-r--r-- | src/math/sqrtf.c | 3 |
diff --git a/src/math/sqrt.c b/src/math/sqrt.c index b2775673..f1f6d76c 100644 --- a/src/math/sqrt.c +++ b/src/math/sqrt.c @@ -179,7 +179,6 @@ double sqrt(double x) ix1 = q1>>1; if (q&1) ix1 |= sign; - ix0 += m << 20; - INSERT_WORDS(z, ix0, ix1); + INSERT_WORDS(z, ix0 + ((uint32_t)m << 20), ix1); return z; } diff --git a/src/math/sqrtf.c b/src/math/sqrtf.c index 28cb4ad3..d6ace38a 100644 --- a/src/math/sqrtf.c +++ b/src/math/sqrtf.c @@ -78,7 +78,6 @@ float sqrtf(float x) } } ix = (q>>1) + 0x3f000000; - ix += m << 23; - SET_FLOAT_WORD(z, ix); + SET_FLOAT_WORD(z, ix + ((uint32_t)m << 23)); return z; } |