aboutsummaryrefslogtreecommitdiff
path: root/std/math/complex/sinh.zig
diff options
context:
space:
mode:
authorMarc Tiehuis <marctiehuis@gmail.com>2019-05-01 18:15:57 +1200
committerMarc Tiehuis <marctiehuis@gmail.com>2019-05-01 18:37:46 +1200
commit89d71a960b0f90335fded84a449a84806bb6f661 (patch)
treeefbb720dbdd17ad782233c958f11d2f584d662c4 /std/math/complex/sinh.zig
parentf94964cd057ace39caa05c10d9626ac6a4beb23b (diff)
downloadzig-89d71a960b0f90335fded84a449a84806bb6f661.tar.gz
zig-89d71a960b0f90335fded84a449a84806bb6f661.zip
std.math: Add documentation for all functions and algorithm sources
Diffstat (limited to 'std/math/complex/sinh.zig')
-rw-r--r--std/math/complex/sinh.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/std/math/complex/sinh.zig b/std/math/complex/sinh.zig
index 0b656e5354..6286d8447f 100644
--- a/std/math/complex/sinh.zig
+++ b/std/math/complex/sinh.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/csinhf.c
+// https://git.musl-libc.org/cgit/musl/tree/src/complex/csinh.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 the hyperbolic sine of z.
pub fn sinh(z: var) @typeOf(z) {
const T = @typeOf(z.re);
return switch (T) {