Fix casts in math module

This commit is contained in:
data-man
2021-05-18 01:14:06 +05:00
committed by Christoffer Lerno
parent 3c4233f4d4
commit 7ee015c84f

View File

@@ -48,9 +48,9 @@ public func double log10(double x)
x = u.f;
hx += 0x3ff00000 - 0x3fe6a09e;
k += (int)(hx >> 20) - 0x3ff;
k += cast(hx >> 20 as int) - 0x3ff;
hx = (hx & 0x000fffff) + 0x3fe6a09e;
u.i = (ulong)(hx) << 32 | (u.i & 0xffffffff);
u.i = cast(hx as ulong) << 32 | (u.i & 0xffffffff);
x = u.f;