We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.9.0
test "floatToInt" { const a: f128 = -2; var b = @floatToInt(i64, a); try expectEqual(@as(i64, -2), b); }
The test to pass, as the f64 version does:
test "floatToInt" { const a: f64 = -2; var b = @floatToInt(i64, a); try expectEqual(@as(i64, -2), b); }
or if the f128 isn't constant:
test "floatToInt" { var a: f128 = -2; var b = @floatToInt(i64, a); try expectEqual(@as(i64, -2), b); }
error: integer value '-18446744073709551615' cannot be stored in type 'i64' const b = @floatToInt(i64, a);
The text was updated successfully, but these errors were encountered:
stage1: fix bigint_init_bigfloat for single-limb negative floats
bd1876c
Fixes ziglang#10592.
419cd4b
a64989e
Fixes #10592.
880e897
06ae13f
Successfully merging a pull request may close this issue.
Zig Version
0.9.0
Steps to Reproduce
Expected Behavior
The test to pass, as the f64 version does:
or if the f128 isn't constant:
Actual Behavior
The text was updated successfully, but these errors were encountered: