This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Improve performance of sinf/cosf/sincosf


>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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]