|author||S. Gilles <email@example.com>||2018-06-30 19:40:01 -0400|
|committer||S. Gilles <firstname.lastname@example.org>||2018-06-30 19:40:01 -0400|
Document results of sin/cos a bit more.
Diffstat (limited to 'lib/math')
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/math/sin-impl.myr b/lib/math/sin-impl.myr
index db9d47c..1f92981 100644
@@ -7,11 +7,15 @@ use "sum-impl"
- This implmentation of sin and cos uses the "Highly Accurate
- Tables" method of [GB91]. The idea is to tabulate [0, pi/4] at
- 256 slightly irregular intervals xi, with the lucky property
- that the infinite binary expansions of significands of sin(xi)
- and cos(xi) look like
+ This implementation of sin and cos uses the "Highly Accurate
+ Tables" method of [GB91]. It's not as fast as it could be (the
+ sorting and excessive summation really takes a toll), however
+ we seem to be consistently within +/-1 ulp of the correct result
+ in flt64 case. In flt32 case we are correctly rounded.
+ The idea is to tabulate [0, pi/4] at 256 slightly irregular
+ intervals xi, with the lucky property that the infinite binary
+ expansions of significands of sin(xi) and cos(xi) look like
/ 53 bits \ / many '0's \ / noise \