mpn_sqrtrem{1,2}
Torbjörn Granlund
tg at gmplib.org
Fri Mar 24 14:56:46 UTC 2017
I haven't followed this thread carefully, but now I have some questions:
Are these instructions affected by rounding mode? Are there variants
where the instructions themselves specify the rounding mode?
The adjustment steps look a bit confusing, and perhaps sub-optimal.
Would it not be possible to set things up (with or without rounding
control) such that the result is always at most one off and always in
one direction? Then a conditional increment (decrement) would suffice.
Why do you use IEEE single-precision sqrtss when limbs are 32 bits? It
appears that sqrtsd would give a correct result always after conversion
back to mp_limb_t, without any "adjustments".
--
Torbjörn
Please encrypt, key id 0xC8601622
More information about the gmp-devel
mailing list