aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/complex/ldexp.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-17 19:30:38 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-17 19:30:38 -0700
commit615d45da779842715a3ab65b59233e9cfb4fa122 (patch)
tree9c269e8fa9beded00954d82ebc0c95d56c485322 /lib/std/math/complex/ldexp.zig
parent1d3f76bbda90f810a24845c15516235d91ee12ad (diff)
parent0dd0c9620d66afcfabaf3dcb21b636530fd0ccba (diff)
downloadzig-615d45da779842715a3ab65b59233e9cfb4fa122.tar.gz
zig-615d45da779842715a3ab65b59233e9cfb4fa122.zip
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
Conflicts: * src/codegen/spirv.zig * src/link/SpirV.zig We're going to want to improve the stage2 test harness to print the source file name when a compile error occurs otherwise std lib contributors are going to see some confusing CI failures when they cause stage2 AstGen compile errors.
Diffstat (limited to 'lib/std/math/complex/ldexp.zig')
-rw-r--r--lib/std/math/complex/ldexp.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/math/complex/ldexp.zig b/lib/std/math/complex/ldexp.zig
index 3ae0382fe3..9f31aae549 100644
--- a/lib/std/math/complex/ldexp.zig
+++ b/lib/std/math/complex/ldexp.zig
@@ -48,7 +48,7 @@ fn ldexp_cexp32(z: Complex(f32), expt: i32) Complex(f32) {
const half_expt2 = exptf - half_expt1;
const scale2 = @bitCast(f32, (0x7f + half_expt2) << 23);
- return Complex(f32).new(math.cos(z.im) * exp_x * scale1 * scale2, math.sin(z.im) * exp_x * scale1 * scale2);
+ return Complex(f32).init(math.cos(z.im) * exp_x * scale1 * scale2, math.sin(z.im) * exp_x * scale1 * scale2);
}
fn frexp_exp64(x: f64, expt: *i32) f64 {
@@ -78,7 +78,7 @@ fn ldexp_cexp64(z: Complex(f64), expt: i32) Complex(f64) {
const half_expt2 = exptf - half_expt1;
const scale2 = @bitCast(f64, (0x3ff + half_expt2) << 20);
- return Complex(f64).new(
+ return Complex(f64).init(
math.cos(z.im) * exp_x * scale1 * scale2,
math.sin(z.im) * exp_x * scale1 * scale2,
);