std.fmt.parseFloat: fix hex-float negative inf

Closes #24111.
This commit is contained in:
Marc Tiehuis
2025-06-08 14:32:16 +12:00
committed by Andrew Kelley
parent 201c0f54a5
commit cffa98eef5
2 changed files with 4 additions and 1 deletions

View File

@@ -159,6 +159,9 @@ test "hex.special" {
try testing.expect(math.isPositiveInf(try parseFloat(f32, "iNf")));
try testing.expect(math.isPositiveInf(try parseFloat(f32, "+Inf")));
try testing.expect(math.isNegativeInf(try parseFloat(f32, "-iNf")));
try testing.expect(math.isPositiveInf(try parseFloat(f32, "0x9999p9999")));
try testing.expect(math.isNegativeInf(try parseFloat(f32, "-0x9999p9999")));
}
test "hex.zero" {