[PATCH] Improve performance of sinf/cosf/sincosf

Jon Beniston jon@beniston.com
Tue Jun 19 10:36:00 GMT 2018


>16-bit - ~200% worse and wrong results

This can be fixed in reduce_fast, by changing: 

-  int n = ((int)r + 0x800000) >> 24;
+  int n = ((int32_t)r + 0x800000) >> 24;

It's then ~400% slower, but gets the right answer.

Cheers,
Jon




More information about the Newlib mailing list