3 ms·
The post says that programmers convert to radians to call APIs that take radians and then immediately divide by pi before computing the sine. So doing everythin
by anonymoushn 4y ago
The post says that programmers convert to radians to call APIs that take radians and then immediately divide by pi before computing the sine. So doing everything in radians would still involve an extra floating point divide compared to the alternative.
- WastingMyTime89 4y agoNo, you are confused. That’s a conversion back to degree after computing the sine. You don’t randomly divide by pi for no reason.
- anonymoushn 4y agoso you're telling me 4/pi is the conversion ratio between degrees and radians, and i am confused? If you would be so kind, point out the part of the sine implementation that works in degrees: https://github.com/reyoung/avx_mathfun/blob/be617bbcf66993c4f7e7d267ed9926cd8e7d4f02/avx_mathfun.h#L355 https://github.com/reyoung/avx_mathfun/blob/be617bbcf66993c4...