Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(stdlib): Cleanup old trig func from Number lib #2169

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions stdlib/number.gr
Original file line number Diff line number Diff line change
Expand Up @@ -661,28 +661,6 @@ provide let parse = input => {
}
}

/**
* Computes how many times pi has to be subtracted to achieve the required bounds for sin.
*/
let reduceToPiBound = (radians: Number) => {
floor(radians / pi)
}

/**
* Computes the sine of a number using Chebyshev polynomials. Requires the input to be bounded to (-pi, pi). More information on the algorithm can be found here: http://mooooo.ooo/chebyshev-sine-approximation/.
*/
let chebyshevSine = (radians: Number) => {
let pi_minor = -0.00000008742278
let x2 = radians * radians
let p11 = 0.00000000013291342
let p9 = p11 * x2 + -0.000000023317787
let p7 = p9 * x2 + 0.0000025222919
let p5 = p7 * x2 + -0.00017350505
let p3 = p5 * x2 + 0.0066208798
let p1 = p3 * x2 + -0.10132118
(radians - pi - pi_minor) * (radians + pi + pi_minor) * p1 * radians
}

@unsafe
let rf = z => {
// see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE at top of file
Expand Down
Loading