aboutsummaryrefslogtreecommitdiff
path: root/std/math/tanh.zig
diff options
context:
space:
mode:
authorAndrea Orru <andrea@orru.io>2018-08-06 01:43:19 -0400
committerAndrea Orru <andrea@orru.io>2018-08-06 01:43:19 -0400
commitd2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d (patch)
treee9fa3caec533a0d1e2b434868b2fde1f9240e5c8 /std/math/tanh.zig
parent06614b3fa09954464c2e2f32756cacedc178a282 (diff)
parent63a23e848a62d5f167f8d5478de9766cb24aa6eb (diff)
downloadzig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.tar.gz
zig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.zip
Merge branch 'master' into zen_stdlib
Diffstat (limited to 'std/math/tanh.zig')
-rw-r--r--std/math/tanh.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/math/tanh.zig b/std/math/tanh.zig
index c1f5a0ca46..6204b2a374 100644
--- a/std/math/tanh.zig
+++ b/std/math/tanh.zig
@@ -68,7 +68,7 @@ fn tanh32(x: f32) f32 {
fn tanh64(x: f64) f64 {
const u = @bitCast(u64, x);
- const w = u32(u >> 32);
+ const w = @intCast(u32, u >> 32);
const ax = @bitCast(f64, u & (@maxValue(u64) >> 1));
var t: f64 = undefined;
@@ -100,7 +100,7 @@ fn tanh64(x: f64) f64 {
}
// |x| is subnormal
else {
- math.forceEval(f32(x));
+ math.forceEval(@floatCast(f32, x));
t = x;
}