From fcbb7426faac5e693ef195defe2d8d2a2eddadb1 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 31 May 2018 10:56:59 -0400 Subject: use * for pointer type instead of & See #770 To help automatically translate code, see the zig-fmt-pointer-reform-2 branch. This will convert all & into *. Due to the syntax ambiguity (which is why we are making this change), even address-of & will turn into *, so you'll have to manually fix thes instances. You will be guaranteed to get compile errors for them - expected 'type', found 'foo' --- std/math/complex/exp.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/math/complex/exp.zig') diff --git a/std/math/complex/exp.zig b/std/math/complex/exp.zig index 8fe069a43d..44c354f246 100644 --- a/std/math/complex/exp.zig +++ b/std/math/complex/exp.zig @@ -16,7 +16,7 @@ pub fn exp(z: var) Complex(@typeOf(z.re)) { }; } -fn exp32(z: &const Complex(f32)) Complex(f32) { +fn exp32(z: *const 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: *const 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 -- cgit v1.2.3