Anomaly in mpn_sqrtrem and mpn_rootrem

Torbjörn Granlund tg at gmplib.org
Mon Jul 6 21:28:50 UTC 2015


bodrato at mail.dm.unipi.it writes:

  4095      #2112866.69    2407388.57    2453779.52
  4096      #1849300.02    2377781.13    2416991.81
  4097      #2144198.04    2376456.38    2492709.77
  4098      #1853563.19    2379253.13    2469931.56
  
  ... yes, I know, we really need to improve also odd sizes...
  
Perhaps one could simply wrap the current function in code which appends
a zero limbs, calls the current code, and then right-shift the root by
half the limb bitcount?

(One would possibly need to suppress such code for operands below a
certain size, to avoid slowdowns.)

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


More information about the gmp-devel mailing list