aboutsummaryrefslogtreecommitdiff
path: root/std/math/sinh.zig
diff options
context:
space:
mode:
Diffstat (limited to 'std/math/sinh.zig')
-rw-r--r--std/math/sinh.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/std/math/sinh.zig b/std/math/sinh.zig
index 32f67a49a8..095dd7ea06 100644
--- a/std/math/sinh.zig
+++ b/std/math/sinh.zig
@@ -11,11 +11,11 @@ const expo2 = @import("expo2.zig").expo2;
pub fn sinh(x: var) -> @typeOf(x) {
const T = @typeOf(x);
- switch (T) {
+ return switch (T) {
f32 => @inlineCall(sinh32, x),
f64 => @inlineCall(sinh64, x),
else => @compileError("sinh not implemented for " ++ @typeName(T)),
- }
+ };
}
// sinh(x) = (exp(x) - 1 / exp(x)) / 2
@@ -49,7 +49,7 @@ fn sinh32(x: f32) -> f32 {
}
// |x| > log(FLT_MAX) or nan
- 2 * h * expo2(ax)
+ return 2 * h * expo2(ax);
}
fn sinh64(x: f64) -> f64 {
@@ -83,7 +83,7 @@ fn sinh64(x: f64) -> f64 {
}
// |x| > log(DBL_MAX) or nan
- 2 * h * expo2(ax)
+ return 2 * h * expo2(ax);
}
test "math.sinh" {