Anomaly in mpn_sqrtrem and mpn_rootrem

Torbjörn Granlund tg at gmplib.org
Wed Jul 8 14:20:51 UTC 2015


bodrato at mail.dm.unipi.it writes:

  The code above should give a range for the first 5 bits (the first is 1
  anyway), and it should work for any k.
  
I have't looked at the maths, so I am not yet impressed...

But I spotted "% k" and "/ k" there, and those are very expensive,
unless you table inverses of k, of course...


-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list