Skip to content

Commit 9932a39

Browse files
MaxGraeydcodeIO
authored andcommitted
Sync with latest musl updates (#935)
1 parent eee0307 commit 9932a39

11 files changed

+1427
-1404
lines changed

std/assembly/math.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,9 +1207,8 @@ export namespace NativeMath {
12071207
if (iy >= 0x43400000) yisint = 2;
12081208
else if (iy >= 0x3FF00000) {
12091209
k = (iy >> 20) - 0x3FF;
1210-
let kcond = k > 20;
1211-
let offset = select<i32>(52, 20, kcond) - k;
1212-
let Ly = select<i32>(ly, iy, kcond);
1210+
let offset = select<u32>(52, 20, k > 20) - k;
1211+
let Ly = select<u32>(ly, iy, k > 20);
12131212
let jj = Ly >> offset;
12141213
if ((jj << offset) == Ly) yisint = 2 - (jj & 1);
12151214
}
@@ -2206,6 +2205,7 @@ export namespace NativeMathf {
22062205
var sign_ = <i32>(hx >> 31);
22072206
hx &= 0x7FFFFFFF;
22082207
if (hx >= 0x42AEAC50) {
2208+
if (hx > 0x7F800000) return x; // NaN
22092209
if (hx >= 0x42B17218) {
22102210
if (!sign_) return x * Ox1p127f;
22112211
else if (hx >= 0x42CFF1B5) return 0;

0 commit comments

Comments
 (0)