http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57073



Jakub Jelinek <jakub at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |jakub at gcc dot gnu.org



--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-26 
07:06:53 UTC ---

Modulo is an integer only operation, so I'd say you want

(k & 1) ? -1.0 : 1.0

instead, converting (k & 1) into floating point and multiplying and subtracting

it or (k & 1) << 1 into floating point and subtracting it is is likely going to

be more expensive, though of course it should be benchmarked.

Reply via email to