authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-18 15:15:03-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-09-18 15:15:03-04:00
log275b4100c0352cae6760797232489dba21bfb68f
treee73a1011fe621114eb348d5be03e0f2612ff1b81
parent4b2719b51d7ec9a38bad57ca02040231b6e8df26
signaturelock-open Commit is signed but in an unrecognized format.

remove unnecessary setFloatMode calls

Now that Strict is the default, these calls only add noise.

3 files changed, 0 insertions(+), 10 deletions(-)

std/math/acosh.zig-4
...@@ -19,8 +19,6 @@ pub fn acosh(x: var) @typeOf(x) {...@@ -19,8 +19,6 @@ pub fn acosh(x: var) @typeOf(x) {
1919
20// acosh(x) = log(x + sqrt(x * x - 1))20// acosh(x) = log(x + sqrt(x * x - 1))
21fn acosh32(x: f32) f32 {21fn acosh32(x: f32) f32 {
22 @setFloatMode(this, builtin.FloatMode.Strict);
23
24 const u = @bitCast(u32, x);22 const u = @bitCast(u32, x);
25 const i = u & 0x7FFFFFFF;23 const i = u & 0x7FFFFFFF;
2624
...@@ -39,8 +37,6 @@ fn acosh32(x: f32) f32 {...@@ -39,8 +37,6 @@ fn acosh32(x: f32) f32 {
39}37}
4038
41fn acosh64(x: f64) f64 {39fn acosh64(x: f64) f64 {
42 @setFloatMode(this, builtin.FloatMode.Strict);
43
44 const u = @bitCast(u64, x);40 const u = @bitCast(u64, x);
45 const e = (u >> 52) & 0x7FF;41 const e = (u >> 52) & 0x7FF;
4642
std/math/log1p.zig-4
...@@ -21,8 +21,6 @@ pub fn log1p(x: var) @typeOf(x) {...@@ -21,8 +21,6 @@ pub fn log1p(x: var) @typeOf(x) {
21}21}
2222
23fn log1p_32(x: f32) f32 {23fn log1p_32(x: f32) f32 {
24 @setFloatMode(this, builtin.FloatMode.Strict);
25
26 const ln2_hi = 6.9313812256e-01;24 const ln2_hi = 6.9313812256e-01;
27 const ln2_lo = 9.0580006145e-06;25 const ln2_lo = 9.0580006145e-06;
28 const Lg1: f32 = 0xaaaaaa.0p-24;26 const Lg1: f32 = 0xaaaaaa.0p-24;
...@@ -99,8 +97,6 @@ fn log1p_32(x: f32) f32 {...@@ -99,8 +97,6 @@ fn log1p_32(x: f32) f32 {
99}97}
10098
101fn log1p_64(x: f64) f64 {99fn log1p_64(x: f64) f64 {
102 @setFloatMode(this, builtin.FloatMode.Strict);
103
104 const ln2_hi: f64 = 6.93147180369123816490e-01;100 const ln2_hi: f64 = 6.93147180369123816490e-01;
105 const ln2_lo: f64 = 1.90821492927058770002e-10;101 const ln2_lo: f64 = 1.90821492927058770002e-10;
106 const Lg1: f64 = 6.666666666666735130e-01;102 const Lg1: f64 = 6.666666666666735130e-01;
std/special/builtin.zig-2
...@@ -225,8 +225,6 @@ fn isNan(comptime T: type, bits: T) bool {...@@ -225,8 +225,6 @@ fn isNan(comptime T: type, bits: T) bool {
225// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are225// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are
226// potentially some edge cases remaining that are not handled in the same way.226// potentially some edge cases remaining that are not handled in the same way.
227export fn sqrt(x: f64) f64 {227export fn sqrt(x: f64) f64 {
228 @setFloatMode(this, builtin.FloatMode.Strict);
229
230 const tiny: f64 = 1.0e-300;228 const tiny: f64 = 1.0e-300;
231 const sign: u32 = 0x80000000;229 const sign: u32 = 0x80000000;
232 const u = @bitCast(u64, x);230 const u = @bitCast(u64, x);