Constant trigonometry

The awkward thing about trigonometry is that (as far as I've heard, at least) it's not yet known whether it's feasible to implement it with tolerable performance to the ½ULP accuracy that's needed in order to get consistent results. It's doable for things like +-*/, which are why those are portable and might plausibly be constable one day (if we can figure out how to deal with NAN), and maybe even could happen for relatively-simple well-behaved monotonic functions like pow2(x).

But something like sin(10300) is just fundamentally hard to get right. Just think how many decimal places of accuracy you need on π for the range reduction...

7 Likes