Likely GMP bug

Vincent Lefevre vincent at vinc17.net
Fri Jun 15 17:38:58 UTC 2018


On 2018-06-15 17:41:33 +0200, Torbjorn Granlund wrote:
> This might require more analysis than what we can expect from the
> compiler, as (x >> 1) >> c is not the same thing as x >> (1+c) (at least
> not if the CPU truncates counts).

If one makes sure that the compiler knows the range for c,
they should be equivalent.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list