You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stdlib/number.gr
-22Lines changed: 0 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -661,28 +661,6 @@ provide let parse = input => {
661
661
}
662
662
}
663
663
664
-
/**
665
-
* Computes how many times pi has to be subtracted to achieve the required bounds for sin.
666
-
*/
667
-
let reduceToPiBound = (radians: Number) => {
668
-
floor(radians / pi)
669
-
}
670
-
671
-
/**
672
-
* 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/.
673
-
*/
674
-
let chebyshevSine = (radians: Number) => {
675
-
let pi_minor = -0.00000008742278
676
-
let x2 = radians * radians
677
-
let p11 = 0.00000000013291342
678
-
let p9 = p11 * x2 + -0.000000023317787
679
-
let p7 = p9 * x2 + 0.0000025222919
680
-
let p5 = p7 * x2 + -0.00017350505
681
-
let p3 = p5 * x2 + 0.0066208798
682
-
let p1 = p3 * x2 + -0.10132118
683
-
(radians - pi - pi_minor) * (radians + pi + pi_minor) * p1 * radians
684
-
}
685
-
686
664
@unsafe
687
665
let rf = z => {
688
666
// see: musl/src/math/asin.c and SUN COPYRIGHT NOTICE at top of file
0 commit comments