Skip to content

Commit

Permalink
chore(stdlib): Cleanup old trig func from Number lib (#2169)
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake authored Oct 7, 2024
1 parent bdb4641 commit 584c4d2
Showing 1 changed file with 0 additions and 22 deletions.
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

0 comments on commit 584c4d2

Please sign in to comment.