diff --git a/std/math/acos.zig b/std/math/acos.zig index 9d09b628cb..941643db82 100644 --- a/std/math/acos.zig +++ b/std/math/acos.zig @@ -5,10 +5,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const acos = acos_workaround; - -// TODO issue #393 -pub fn acos_workaround(x: var) -> @typeOf(x) { +pub fn acos(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(acos32, x), @@ -145,8 +142,8 @@ fn acos64(x: f64) -> f64 { } test "math.acos" { - assert(acos_workaround(f32(0.0)) == acos32(0.0)); - assert(acos_workaround(f64(0.0)) == acos64(0.0)); + assert(acos(f32(0.0)) == acos32(0.0)); + assert(acos(f64(0.0)) == acos64(0.0)); } test "math.acos32" { diff --git a/std/math/acosh.zig b/std/math/acosh.zig index 16c869f5f6..4c14837faa 100644 --- a/std/math/acosh.zig +++ b/std/math/acosh.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const acosh = acosh_workaround; - -// TODO issue #393 -pub fn acosh_workaround(x: var) -> @typeOf(x) { +pub fn acosh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(acosh32, x), @@ -56,8 +53,8 @@ fn acosh64(x: f64) -> f64 { } test "math.acosh" { - assert(acosh_workaround(f32(1.5)) == acosh32(1.5)); - assert(acosh_workaround(f64(1.5)) == acosh64(1.5)); + assert(acosh(f32(1.5)) == acosh32(1.5)); + assert(acosh(f64(1.5)) == acosh64(1.5)); } test "math.acosh32" { diff --git a/std/math/asin.zig b/std/math/asin.zig index 3f705a9cf7..b0368b5d66 100644 --- a/std/math/asin.zig +++ b/std/math/asin.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const asin = asin_workaround; - -// TODO issue #393 -pub fn asin_workaround(x: var) -> @typeOf(x) { +pub fn asin(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(asin32, x), @@ -138,8 +135,8 @@ fn asin64(x: f64) -> f64 { } test "math.asin" { - assert(asin_workaround(f32(0.0)) == asin32(0.0)); - assert(asin_workaround(f64(0.0)) == asin64(0.0)); + assert(asin(f32(0.0)) == asin32(0.0)); + assert(asin(f64(0.0)) == asin64(0.0)); } test "math.asin32" { diff --git a/std/math/asinh.zig b/std/math/asinh.zig index 27394e9ce4..dab047036a 100644 --- a/std/math/asinh.zig +++ b/std/math/asinh.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const asinh = asinh_workaround; - -// TODO issue #393 -pub fn asinh_workaround(x: var) -> @typeOf(x) { +pub fn asinh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(asinh32, x), @@ -84,8 +81,8 @@ fn asinh64(x: f64) -> f64 { } test "math.asinh" { - assert(asinh_workaround(f32(0.0)) == asinh32(0.0)); - assert(asinh_workaround(f64(0.0)) == asinh64(0.0)); + assert(asinh(f32(0.0)) == asinh32(0.0)); + assert(asinh(f64(0.0)) == asinh64(0.0)); } test "math.asinh32" { diff --git a/std/math/atan.zig b/std/math/atan.zig index 0c17617245..5f3e207960 100644 --- a/std/math/atan.zig +++ b/std/math/atan.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const atan = atan_workaround; - -pub fn atan_workaround(x: var) -> @typeOf(x) { +pub fn atan(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(atan32, x), @@ -210,8 +207,8 @@ fn atan64(x_: f64) -> f64 { } test "math.atan" { - assert(atan_workaround(f32(0.2)) == atan32(0.2)); - assert(atan_workaround(f64(0.2)) == atan64(0.2)); + assert(atan(f32(0.2)) == atan32(0.2)); + assert(atan(f64(0.2)) == atan64(0.2)); } test "math.atan32" { diff --git a/std/math/atan2.zig b/std/math/atan2.zig index cbe8f5742d..e61d217b49 100644 --- a/std/math/atan2.zig +++ b/std/math/atan2.zig @@ -21,10 +21,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const atan2 = atan2_workaround; - -// TODO issue #393 -fn atan2_workaround(comptime T: type, x: T, y: T) -> T { +fn atan2(comptime T: type, x: T, y: T) -> T { switch (T) { f32 => @inlineCall(atan2_32, x, y), f64 => @inlineCall(atan2_64, x, y), @@ -208,8 +205,8 @@ fn atan2_64(y: f64, x: f64) -> f64 { } test "math.atan2" { - assert(atan2_workaround(f32, 0.2, 0.21) == atan2_32(0.2, 0.21)); - assert(atan2_workaround(f64, 0.2, 0.21) == atan2_64(0.2, 0.21)); + assert(atan2(f32, 0.2, 0.21) == atan2_32(0.2, 0.21)); + assert(atan2(f64, 0.2, 0.21) == atan2_64(0.2, 0.21)); } test "math.atan2_32" { diff --git a/std/math/atanh.zig b/std/math/atanh.zig index 7b1f3d0989..8fe5ab55a7 100644 --- a/std/math/atanh.zig +++ b/std/math/atanh.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const atanh = atanh_workaround; - -pub fn atanh_workaround(x: var) -> @typeOf(x) { +pub fn atanh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(atanh_32, x), diff --git a/std/math/cbrt.zig b/std/math/cbrt.zig index 3674f10c34..273939c6b6 100644 --- a/std/math/cbrt.zig +++ b/std/math/cbrt.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const cbrt = cbrt_workaround; - -pub fn cbrt_workaround(x: var) -> @typeOf(x) { +pub fn cbrt(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(cbrt32, x), diff --git a/std/math/ceil.zig b/std/math/ceil.zig index d88031243b..2c7b28cc93 100644 --- a/std/math/ceil.zig +++ b/std/math/ceil.zig @@ -8,10 +8,7 @@ const builtin = @import("builtin"); const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const ceil = ceil_workaround; - -pub fn ceil_workaround(x: var) -> @typeOf(x) { +pub fn ceil(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(ceil32, x), diff --git a/std/math/copysign.zig b/std/math/copysign.zig index 8c2edeb289..109ee8c632 100644 --- a/std/math/copysign.zig +++ b/std/math/copysign.zig @@ -1,10 +1,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const copysign = copysign_workaround; - -pub fn copysign_workaround(comptime T: type, x: T, y: T) -> T { +pub fn copysign(comptime T: type, x: T, y: T) -> T { switch (T) { f32 => @inlineCall(copysign32, x, y), f64 => @inlineCall(copysign64, x, y), diff --git a/std/math/cos.zig b/std/math/cos.zig index 8bd2a275f7..819336d270 100644 --- a/std/math/cos.zig +++ b/std/math/cos.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const cos = cos_workaround; - -pub fn cos_workaround(x: var) -> @typeOf(x) { +pub fn cos(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(cos32, x), diff --git a/std/math/cosh.zig b/std/math/cosh.zig index e593485315..92902090f1 100644 --- a/std/math/cosh.zig +++ b/std/math/cosh.zig @@ -8,10 +8,7 @@ const math = @import("index.zig"); const expo2 = @import("expo2.zig").expo2; const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const cosh = cosh_workaround; - -pub fn cosh_workaround(x: var) -> @typeOf(x) { +pub fn cosh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(cosh32, x), diff --git a/std/math/exp.zig b/std/math/exp.zig index 36c142c872..87c0a1882e 100644 --- a/std/math/exp.zig +++ b/std/math/exp.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const exp = exp_workaround; - -pub fn exp_workaround(x: var) -> @typeOf(x) { +pub fn exp(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(exp32, x), diff --git a/std/math/exp2.zig b/std/math/exp2.zig index d04f72cbba..111c1dad64 100644 --- a/std/math/exp2.zig +++ b/std/math/exp2.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const exp2 = exp2_workaround; - -pub fn exp2_workaround(x: var) -> @typeOf(x) { +pub fn exp2(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(exp2_32, x), diff --git a/std/math/expm1.zig b/std/math/expm1.zig index 105d64417a..5ee28e7866 100644 --- a/std/math/expm1.zig +++ b/std/math/expm1.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const expm1 = expm1_workaround; - -pub fn expm1_workaround(x: var) -> @typeOf(x) { +pub fn expm1(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(expm1_32, x), diff --git a/std/math/fabs.zig b/std/math/fabs.zig index 185f134663..e9bd3eb689 100644 --- a/std/math/fabs.zig +++ b/std/math/fabs.zig @@ -6,10 +6,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const fabs = fabs_workaround; - -pub fn fabs_workaround(x: var) -> @typeOf(x) { +pub fn fabs(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(fabs32, x), diff --git a/std/math/floor.zig b/std/math/floor.zig index e14e560ef7..85ee2b4923 100644 --- a/std/math/floor.zig +++ b/std/math/floor.zig @@ -8,10 +8,7 @@ const builtin = @import("builtin"); const assert = @import("../debug.zig").assert; const math = @import("index.zig"); -// TODO issue #393 -pub const floor = floor_workaround; - -pub fn floor_workaround(x: var) -> @typeOf(x) { +pub fn floor(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(floor32, x), diff --git a/std/math/fma.zig b/std/math/fma.zig index 4545fc20f2..8dbbc39ed0 100644 --- a/std/math/fma.zig +++ b/std/math/fma.zig @@ -1,10 +1,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const fma = fma_workaround; - -pub fn fma_workaround(comptime T: type, x: T, y: T, z: T) -> T { +pub fn fma(comptime T: type, x: T, y: T, z: T) -> T { switch (T) { f32 => @inlineCall(fma32, x, y, z), f64 => @inlineCall(fma64, x, y ,z), diff --git a/std/math/frexp.zig b/std/math/frexp.zig index 87e35335fe..a40a6dcc39 100644 --- a/std/math/frexp.zig +++ b/std/math/frexp.zig @@ -7,9 +7,6 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const frexp = frexp_workaround; - fn frexp_result(comptime T: type) -> type { struct { significand: T, @@ -19,7 +16,7 @@ fn frexp_result(comptime T: type) -> type { pub const frexp32_result = frexp_result(f32); pub const frexp64_result = frexp_result(f64); -pub fn frexp_workaround(x: var) -> frexp_result(@typeOf(x)) { +pub fn frexp(x: var) -> frexp_result(@typeOf(x)) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(frexp32, x), diff --git a/std/math/hypot.zig b/std/math/hypot.zig index f864237ba3..ee8ce0f518 100644 --- a/std/math/hypot.zig +++ b/std/math/hypot.zig @@ -8,10 +8,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const hypot = hypot_workaround; - -pub fn hypot_workaround(comptime T: type, x: T, y: T) -> T { +pub fn hypot(comptime T: type, x: T, y: T) -> T { switch (T) { f32 => @inlineCall(hypot32, x, y), f64 => @inlineCall(hypot64, x, y), diff --git a/std/math/ilogb.zig b/std/math/ilogb.zig index 5bdbe5f254..2a0ea7fc5f 100644 --- a/std/math/ilogb.zig +++ b/std/math/ilogb.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const ilogb = ilogb_workaround; - -pub fn ilogb_workaround(x: var) -> i32 { +pub fn ilogb(x: var) -> i32 { const T = @typeOf(x); switch (T) { f32 => @inlineCall(ilogb32, x), diff --git a/std/math/ln.zig b/std/math/ln.zig index a0a1429cfa..b77c6cef5b 100644 --- a/std/math/ln.zig +++ b/std/math/ln.zig @@ -10,9 +10,7 @@ const assert = @import("../debug.zig").assert; const builtin = @import("builtin"); const TypeId = builtin.TypeId; -pub const ln = ln_workaround; - -fn ln_workaround(x: var) -> @typeOf(x) { +pub fn ln(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (@typeId(T)) { TypeId.FloatLiteral => { diff --git a/std/math/log.zig b/std/math/log.zig index 180c3aeb31..556113578f 100644 --- a/std/math/log.zig +++ b/std/math/log.zig @@ -3,10 +3,7 @@ const builtin = @import("builtin"); const TypeId = builtin.TypeId; const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const log = log_workaround; - -fn log_workaround(comptime T: type, base: T, x: T) -> T { +pub fn log(comptime T: type, base: T, x: T) -> T { if (base == 2) { return math.log2(x); } else if (base == 10) { diff --git a/std/math/log10.zig b/std/math/log10.zig index a0456e593d..d40475f28d 100644 --- a/std/math/log10.zig +++ b/std/math/log10.zig @@ -10,10 +10,7 @@ const assert = @import("../debug.zig").assert; const builtin = @import("builtin"); const TypeId = builtin.TypeId; -// TODO issue #393 -pub const log10 = log10_workaround; - -fn log10_workaround(x: var) -> @typeOf(x) { +pub fn log10(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (@typeId(T)) { TypeId.FloatLiteral => { diff --git a/std/math/log1p.zig b/std/math/log1p.zig index a49b78d0aa..803726fdcc 100644 --- a/std/math/log1p.zig +++ b/std/math/log1p.zig @@ -9,10 +9,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const log1p = log1p_workaround; - -pub fn log1p_workaround(x: var) -> @typeOf(x) { +pub fn log1p(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(log1p_32, x), diff --git a/std/math/log2.zig b/std/math/log2.zig index 979726442e..86d6487f09 100644 --- a/std/math/log2.zig +++ b/std/math/log2.zig @@ -10,10 +10,7 @@ const assert = @import("../debug.zig").assert; const builtin = @import("builtin"); const TypeId = builtin.TypeId; -// TODO issue #393 -pub const log2 = log2_workaround; - -fn log2_workaround(x: var) -> @typeOf(x) { +pub fn log2(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (@typeId(T)) { TypeId.FloatLiteral => { diff --git a/std/math/modf.zig b/std/math/modf.zig index eb2419b134..25eab7f99d 100644 --- a/std/math/modf.zig +++ b/std/math/modf.zig @@ -6,9 +6,6 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const modf = modf_workaround; - fn modf_result(comptime T: type) -> type { struct { fpart: T, @@ -18,7 +15,7 @@ fn modf_result(comptime T: type) -> type { pub const modf32_result = modf_result(f32); pub const modf64_result = modf_result(f64); -pub fn modf_workaround(x: var) -> modf_result(@typeOf(x)) { +pub fn modf(x: var) -> modf_result(@typeOf(x)) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(modf32, x), diff --git a/std/math/nan.zig b/std/math/nan.zig index 3c7b33e8c4..a4899d6b82 100644 --- a/std/math/nan.zig +++ b/std/math/nan.zig @@ -1,8 +1,6 @@ const math = @import("index.zig"); -pub const nan = nan_workaround; - -pub fn nan_workaround(comptime T: type) -> T { +pub fn nan(comptime T: type) -> T { switch (T) { f32 => @bitCast(f32, math.nan_u32), f64 => @bitCast(f64, math.nan_u64), @@ -10,11 +8,9 @@ pub fn nan_workaround(comptime T: type) -> T { } } -pub const snan = snan_workaround; - // Note: A signalling nan is identical to a standard right now by may have a different bit // representation in the future when required. -pub fn snan_workaround(comptime T: type) -> T { +pub fn snan(comptime T: type) -> T { switch (T) { f32 => @bitCast(f32, math.nan_u32), f64 => @bitCast(f64, math.nan_u64), diff --git a/std/math/pow.zig b/std/math/pow.zig index 042e0c3d1e..4dae71594b 100644 --- a/std/math/pow.zig +++ b/std/math/pow.zig @@ -24,11 +24,8 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const pow = pow_workaround; - // This implementation is taken from the go stlib, musl is a bit more complex. -pub fn pow_workaround(comptime T: type, x: T, y: T) -> T { +pub fn pow(comptime T: type, x: T, y: T) -> T { @setFloatMode(this, @import("builtin").FloatMode.Strict); diff --git a/std/math/round.zig b/std/math/round.zig index 6b7cbf1172..d281651dcd 100644 --- a/std/math/round.zig +++ b/std/math/round.zig @@ -8,10 +8,7 @@ const builtin = @import("builtin"); const assert = @import("../debug.zig").assert; const math = @import("index.zig"); -// TODO issue #393 -pub const round = round_workaround; - -pub fn round_workaround(x: var) -> @typeOf(x) { +pub fn round(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(round32, x), diff --git a/std/math/scalbn.zig b/std/math/scalbn.zig index fcd1a5e68c..bb1e208b9e 100644 --- a/std/math/scalbn.zig +++ b/std/math/scalbn.zig @@ -1,10 +1,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const scalbn = scalbn_workaround; - -pub fn scalbn_workaround(x: var, n: i32) -> @typeOf(x) { +pub fn scalbn(x: var, n: i32) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(scalbn32, x, n), diff --git a/std/math/signbit.zig b/std/math/signbit.zig index 979c45bf41..75b087f539 100644 --- a/std/math/signbit.zig +++ b/std/math/signbit.zig @@ -1,10 +1,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const signbit = signbit_workaround; - -pub fn signbit_workaround(x: var) -> bool { +pub fn signbit(x: var) -> bool { const T = @typeOf(x); switch (T) { f32 => @inlineCall(signbit32, x), diff --git a/std/math/sin.zig b/std/math/sin.zig index 4fe7565cd3..5513ec324e 100644 --- a/std/math/sin.zig +++ b/std/math/sin.zig @@ -7,10 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const sin = sin_workaround; - -pub fn sin_workaround(x: var) -> @typeOf(x) { +pub fn sin(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(sin32, x), diff --git a/std/math/sinh.zig b/std/math/sinh.zig index e1b001d287..82318196d8 100644 --- a/std/math/sinh.zig +++ b/std/math/sinh.zig @@ -8,10 +8,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; const expo2 = @import("expo2.zig").expo2; -// TODO issue #393 -pub const sinh = sinh_workaround; - -pub fn sinh_workaround(x: var) -> @typeOf(x) { +pub fn sinh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(sinh32, x), diff --git a/std/math/sqrt.zig b/std/math/sqrt.zig index 4cb65bfac2..bd1bb1fca4 100644 --- a/std/math/sqrt.zig +++ b/std/math/sqrt.zig @@ -8,10 +8,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -// TODO issue #393 -pub const sqrt = sqrt_workaround; - -pub fn sqrt_workaround(x: var) -> @typeOf(x) { +pub fn sqrt(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(sqrt32, x), diff --git a/std/math/tan.zig b/std/math/tan.zig index 4ef4bf6c73..fcb62f5046 100644 --- a/std/math/tan.zig +++ b/std/math/tan.zig @@ -7,9 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const tan = tan_workaround; - -pub fn tan_workaround(x: var) -> @typeOf(x) { +pub fn tan(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(tan32, x), diff --git a/std/math/tanh.zig b/std/math/tanh.zig index c88dc08156..866a678318 100644 --- a/std/math/tanh.zig +++ b/std/math/tanh.zig @@ -8,10 +8,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; const expo2 = @import("expo2.zig").expo2; -// TODO issue #393 -pub const tanh = tanh_workaround; - -pub fn tanh_workaround(x: var) -> @typeOf(x) { +pub fn tanh(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(tanh32, x), diff --git a/std/math/trunc.zig b/std/math/trunc.zig index 69e8f37577..937a8155e6 100644 --- a/std/math/trunc.zig +++ b/std/math/trunc.zig @@ -7,9 +7,7 @@ const math = @import("index.zig"); const assert = @import("../debug.zig").assert; -pub const trunc = trunc_workaround; - -pub fn trunc_workaround(x: var) -> @typeOf(x) { +pub fn trunc(x: var) -> @typeOf(x) { const T = @typeOf(x); switch (T) { f32 => @inlineCall(trunc32, x),