**diff options**

author | S. Gilles <sgilles@math.umd.edu> | 2018-06-30 19:40:01 -0400 |
---|---|---|

committer | S. Gilles <sgilles@math.umd.edu> | 2018-06-30 19:40:01 -0400 |

commit | 728bf756970e75ca3217776c23dad1637d0f6f2c (patch) | |

tree | ff874947760b676b8870c1ae0017217decb8ef1f /lib/math | |

parent | 9afaec2ee7ed8864f9f28c39533e2f2094301fba (diff) | |

download | mc-728bf756970e75ca3217776c23dad1637d0f6f2c.tar.gz |

Document results of sin/cos a bit more.

Diffstat (limited to 'lib/math')

-rw-r--r-- | lib/math/sin-impl.myr | 14 |

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 --- a/lib/math/sin-impl.myr +++ b/lib/math/sin-impl.myr @@ -7,11 +7,15 @@ use "sum-impl" use "util" /* - 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 \ 1.bbbbbb...bb00000000000...0???????????... |