Conversation
|
Passes tests for me. |
|
Out of curiosity - why did you not just implement the 4-line trivial version that was in libm-test.c? |
|
Perhaps I'm a glutton for punishment, but I wanted to see if the work that is being saved by performing the common calculations only once was significant. Turns out it's not, (at least, not with |
|
:-) |
There was a problem hiding this comment.
Whoa, this isn't a formatting change.
So is this faster than the old code?
There was a problem hiding this comment.
This change is paired with the additions below on lines 58-59; I swapped the inequalities to instead match the order found in s_sinf.c for easy comparison between the two. There should be no difference in performance, unfortunately. ;)
Adds in implementations for sincos(), an efficient method of computing the sine and cosine of the same angle.
I'm not entirely sure how to test the 80-bit long double versions, so I haven't attempt to make it more efficient than simply calling sin/cos in succession.