aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/complex.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-04-26 10:13:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-04-27 12:20:44 -0700
commit41dd2beaacade94c5c98400a4a655aea07b9e2f3 (patch)
treed7cd75c3ded0e8517e801f62dbb883d93f3cd585 /lib/std/math/complex.zig
parent6f4343b61afe36a709e713735947561a2b76bce8 (diff)
downloadzig-41dd2beaacade94c5c98400a4a655aea07b9e2f3.tar.gz
zig-41dd2beaacade94c5c98400a4a655aea07b9e2f3.zip
compiler-rt: math functions reorg
* unify the logic for exporting math functions from compiler-rt, with the appropriate suffixes and prefixes. - add all missing f128 and f80 exports. Functions with missing implementations call other functions and have TODO comments. - also add f16 functions * move math functions from freestanding libc to compiler-rt (#7265) * enable all the f128 and f80 code in the stage2 compiler and behavior tests (#11161). * update std lib to use builtins rather than `std.math`.
Diffstat (limited to 'lib/std/math/complex.zig')
-rw-r--r--lib/std/math/complex.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/math/complex.zig b/lib/std/math/complex.zig
index 42342faa3e..2fd1cf15a1 100644
--- a/lib/std/math/complex.zig
+++ b/lib/std/math/complex.zig
@@ -115,7 +115,7 @@ pub fn Complex(comptime T: type) type {
/// Returns the magnitude of a complex number.
pub fn magnitude(self: Self) T {
- return math.sqrt(self.re * self.re + self.im * self.im);
+ return @sqrt(self.re * self.re + self.im * self.im);
}
};
}