http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46316
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-08 07:34:48 UTC --- Instead of multiplication followed by division, it would be faster to just use mul_double_with_sign which returns whether there was an overflow or not.