Closed timboldt closed 3 years ago
If you think it would be useful, I could add some table-driven tests for some of the functions, like acos(), that don't have them.
@timboldt absolutely, that'd be great!
FYI, I'm about to land a pretty major refactor (#75), so maybe give me an hour or so. NM, just landed it! Go for it.
I passed in a slightly negative value, -0.09557510558, and got a very unexpected value near -1.5. The correct output should be near +1.6 (i.e. close to +90 degrees).
I had intended to pass in 0.0, with an expected output of +1.57 (+90 degrees), but when I tried that, I got a panic. (The approximation is dividing by zero.)
There are hints in the associated StackExchange article (referenced in acos.rs) that suggest a fix for this.