diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-06-17 14:40:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-17 14:40:07 -0400 |
| commit | 431fda414189e012252614c7cf3702b46b305e35 (patch) | |
| tree | 929ff496c8b03785eb425329318f5b38170d6962 /std/math/complex/exp.zig | |
| parent | e5956f23ca702b79a3a4b0f0440a2fe88e0231e5 (diff) | |
| parent | 74ccf56a4b1da78b6cd6b0ac34dd6ded1e15b155 (diff) | |
| download | zig-431fda414189e012252614c7cf3702b46b305e35.tar.gz zig-431fda414189e012252614c7cf3702b46b305e35.zip | |
Merge pull request #1123 from ziglang/remove-number-casting-syntax
Remove number casting syntax
Diffstat (limited to 'std/math/complex/exp.zig')
| -rw-r--r-- | std/math/complex/exp.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/math/complex/exp.zig b/std/math/complex/exp.zig index 44c354f246..48fb132d97 100644 --- a/std/math/complex/exp.zig +++ b/std/math/complex/exp.zig @@ -6,7 +6,7 @@ const Complex = cmath.Complex; const ldexp_cexp = @import("ldexp.zig").ldexp_cexp; -pub fn exp(z: var) Complex(@typeOf(z.re)) { +pub fn exp(z: var) @typeOf(z) { const T = @typeOf(z.re); return switch (T) { @@ -16,7 +16,7 @@ pub fn exp(z: var) Complex(@typeOf(z.re)) { }; } -fn exp32(z: *const Complex(f32)) Complex(f32) { +fn exp32(z: Complex(f32)) Complex(f32) { @setFloatMode(this, @import("builtin").FloatMode.Strict); const exp_overflow = 0x42b17218; // max_exp * ln2 ~= 88.72283955 @@ -63,7 +63,7 @@ fn exp32(z: *const Complex(f32)) Complex(f32) { } } -fn exp64(z: *const Complex(f64)) Complex(f64) { +fn exp64(z: Complex(f64)) Complex(f64) { const exp_overflow = 0x40862e42; // high bits of max_exp * ln2 ~= 710 const cexp_overflow = 0x4096b8e4; // (max_exp - min_denorm_exp) * ln2 |
