diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-08-25 21:57:28 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-08-25 21:57:28 -0400 |
| commit | 7109035b78ee05302bbdaadc52013b430a030b69 (patch) | |
| tree | ae6d7202dc75f2c799f5fbcad72ccf8b02a954a4 /std/math/round.zig | |
| parent | 6cf248ec0824c746fc796905144c8077ccab99cf (diff) | |
| parent | 526338b00fbe1cac19f64832176af3bdf2108a56 (diff) | |
| download | zig-7109035b78ee05302bbdaadc52013b430a030b69.tar.gz zig-7109035b78ee05302bbdaadc52013b430a030b69.zip | |
Merge remote-tracking branch 'origin/master' into llvm7
Diffstat (limited to 'std/math/round.zig')
| -rw-r--r-- | std/math/round.zig | 12 |
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) { |
