aboutsummaryrefslogtreecommitdiff
path: root/std/math/tan.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/tan.zig
parent06614b3fa09954464c2e2f32756cacedc178a282 (diff)
parent63a23e848a62d5f167f8d5478de9766cb24aa6eb (diff)
downloadzig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.tar.gz
zig-d2f5e57b68da0b16e5789ca19045ccbcb4ecfa8d.zip
Merge branch 'master' into zen_stdlib
Diffstat (limited to 'std/math/tan.zig')
-rw-r--r--std/math/tan.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/std/math/tan.zig b/std/math/tan.zig
index 11428b6e8b..ff3ed06186 100644
--- a/std/math/tan.zig
+++ b/std/math/tan.zig
@@ -19,12 +19,12 @@ pub fn tan(x: var) @typeOf(x) {
}
const Tp0 = -1.30936939181383777646E4;
-const Tp1 = 1.15351664838587416140E6;
+const Tp1 = 1.15351664838587416140E6;
const Tp2 = -1.79565251976484877988E7;
-const Tq1 = 1.36812963470692954678E4;
+const Tq1 = 1.36812963470692954678E4;
const Tq2 = -1.32089234440210967447E6;
-const Tq3 = 2.50083801823357915839E7;
+const Tq3 = 2.50083801823357915839E7;
const Tq4 = -5.38695755929454629881E7;
// NOTE: This is taken from the go stdlib. The musl implementation is much more complex.
@@ -53,7 +53,7 @@ fn tan32(x_: f32) f32 {
}
var y = math.floor(x * m4pi);
- var j = i64(y);
+ var j = @floatToInt(i64, y);
if (j & 1 == 1) {
j += 1;
@@ -102,7 +102,7 @@ fn tan64(x_: f64) f64 {
}
var y = math.floor(x * m4pi);
- var j = i64(y);
+ var j = @floatToInt(i64, y);
if (j & 1 == 1) {
j += 1;