-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Implementation is here: https://github.com/ziglang/zig/blob/master/lib/std/fmt/parse_float.zig
--- a/lib/std/fmt/parse_float.zig
+++ b/lib/std/fmt/parse_float.zig
@@ -425,4 +425,6 @@ test "fmt.parseFloat" {
try expect(approxEqAbs(T, try parseFloat(T, "2.71828182845904523536"), @as(T, 2.718281828459045), epsilon));
}
}
+
+ try expectEqual(try parseFloat(f128, "9007199254740993.0"), 9007199254740993.0);
}
$ ./zig test ../lib/std/fmt/parse_float.zig
Test [1/1] test "parseFloat"... expected 9.007199254740994e+15, found 9.007199254740992e+15
Test [1/1] test "parseFloat"... FAIL (TestExpectedEqual)
This is causing a behavior test failure in the self-hosted compiler, which relies on std.fmt.parseFloat
:
Line 679 in 9eceba2
try expect(9007199254740992.0 + 1.0 == 9007199254740993.0); |
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.