aboutsummaryrefslogtreecommitdiff
path: root/std/math/round.zig
diff options
context:
space:
mode:
Diffstat (limited to 'std/math/round.zig')
-rw-r--r--std/math/round.zig12
1 files changed, 2 insertions, 10 deletions
diff --git a/std/math/round.zig b/std/math/round.zig
index c8d9eb4fd4..4fe35365c8 100644
--- a/std/math/round.zig
+++ b/std/math/round.zig
@@ -35,11 +35,7 @@ fn round32(x_: f32) f32 {
return 0 * @bitCast(f32, u);
}
- {
- @setFloatMode(this, builtin.FloatMode.Strict);
- y = x + math.f32_toint - math.f32_toint - x;
- }
-
+ y = x + math.f32_toint - math.f32_toint - x;
if (y > 0.5) {
y = y + x - 1;
} else if (y <= -0.5) {
@@ -72,11 +68,7 @@ fn round64(x_: f64) f64 {
return 0 * @bitCast(f64, u);
}
- {
- @setFloatMode(this, builtin.FloatMode.Strict);
- y = x + math.f64_toint - math.f64_toint - x;
- }
-
+ y = x + math.f64_toint - math.f64_toint - x;
if (y > 0.5) {
y = y + x - 1;
} else if (y <= -0.5) {