mpn_sqrtrem{1,2} - rounding mode - erratum

Torbjörn Granlund tg at gmplib.org
Sun Mar 26 01:29:00 UTC 2017


A SIMD trick might be to use sqrtpd for computing r = sqrt(a*(1+eps))
and s = sqrt(a*(1-eps)) in parallel; the idea being that r will always
be slightly smaller than the true result and s always slightly larger
(irrespective of any pesky rounding mode).

With the right constants, we should be able to compute a well-chosen
average without at the integer side without any multiplies or
conditions...

  

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


More information about the gmp-devel mailing list