aboutsummaryrefslogtreecommitdiff
path: root/std/math/complex/exp.zig
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2019-05-02 19:05:26 +1200
committerGitHub <noreply@github.com>2019-05-02 19:05:26 +1200
commitf950ec0c16de6dba8a541b1a6453ebe431430782 (patch)
tree47df2ed19eece69d35a60eeff8c26511cfe996e3 /std/math/complex/exp.zig
parentc00c18de6a5e436b1c362c06d6e5259c8f731a90 (diff)
parent3370e60dd96828db6f9d1da36e71064303e97de6 (diff)
downloadzig-f950ec0c16de6dba8a541b1a6453ebe431430782.tar.gz
zig-f950ec0c16de6dba8a541b1a6453ebe431430782.zip
Merge pull request #2397 from ziglang/std.math
Review std/math and update documentation
Diffstat (limited to 'std/math/complex/exp.zig')
-rw-r--r--std/math/complex/exp.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/std/math/complex/exp.zig b/std/math/complex/exp.zig
index c74ac2fc08..9b686bebc3 100644
--- a/std/math/complex/exp.zig
+++ b/std/math/complex/exp.zig
@@ -1,3 +1,9 @@
+// Ported from musl, which is licensed under the MIT license:
+// https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
+//
+// https://git.musl-libc.org/cgit/musl/tree/src/complex/cexpf.c
+// https://git.musl-libc.org/cgit/musl/tree/src/complex/cexp.c
+
const std = @import("../../std.zig");
const testing = std.testing;
const math = std.math;
@@ -6,6 +12,7 @@ const Complex = cmath.Complex;
const ldexp_cexp = @import("ldexp.zig").ldexp_cexp;
+/// Returns e raised to the power of z (e^z).
pub fn exp(z: var) @typeOf(z) {
const T = @typeOf(z.re);