Fixes math library compiling on msvc (#4511)

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
This commit is contained in:
Yonggang Luo
2021-02-04 20:19:13 +08:00
committed by GitHub
parent 9dbb594170
commit aa941ed58e
8 changed files with 40 additions and 21 deletions
+2 -2
View File
@@ -65,11 +65,11 @@ log2 (double x)
{ /* x < 2**-1022 */
if (((hx & 0x7fffffff) | lx) == 0)
{
return -two54 / zero; /* log(+-0)=-inf */
return -INFINITY; /* log(+-0)=-inf */
}
if (hx < 0)
{
return (x - x) / zero; /* log(-#) = NaN */
return NAN; /* log(-#) = NaN */
}
k -= 54;
x *= two54; /* subnormal number, scale up x */