commit b02384e03d1e52d72ccf7dd7d3cec30f05b51082 (tree)
parent d28b445329fbee865a10568e997241079d4d71e4
Author: Marc Tiehuis <marc@tiehu.is>
Date: Mon, 6 Dec 2021 01:17:01 +1300
std/math: hide internal cos/tan functions
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/std/math/cos.zig b/lib/std/math/cos.zig
@@ -26,7 +26,7 @@ pub fn cos(x: anytype) @TypeOf(x) {
};
}
-pub fn cos32(x: f32) f32 {
+fn cos32(x: f32) f32 {
// Small multiples of pi/2 rounded to double precision.
const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
@@ -83,7 +83,7 @@ pub fn cos32(x: f32) f32 {
};
}
-pub fn cos64(x: f64) f64 {
+fn cos64(x: f64) f64 {
var ix = @bitCast(u64, x) >> 32;
ix &= 0x7fffffff;
diff --git a/lib/std/math/tan.zig b/lib/std/math/tan.zig
@@ -28,7 +28,7 @@ pub fn tan(x: anytype) @TypeOf(x) {
};
}
-pub fn tan32(x: f32) f32 {
+fn tan32(x: f32) f32 {
// Small multiples of pi/2 rounded to double precision.
const t1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
const t2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
@@ -72,7 +72,7 @@ pub fn tan32(x: f32) f32 {
return kernel.__tandf(y, n & 1 != 0);
}
-pub fn tan64(x: f64) f64 {
+fn tan64(x: f64) f64 {
var ix = @bitCast(u64, x) >> 32;
ix &= 0x7fffffff;