mpn_sqrtrem{1,2} - rounding mode - erratum

Adrien Prost-Boucle adrien.prost-boucle at
Sat Mar 25 23:54:50 UTC 2017

> I tested with a function that repeatedly sets all rounding modes.
> The result is: 995413 calls to fesetround() per second on my laptop
> That's extremely slow given the speed of the sqrt function!

Ooops there was a typo in my code: division by 4 instead of
multiplication by 4 (the number of rounding modes).
The actual speed is 15 million mode changes per second.
This is still not enough anyway.
But I didn't investigate how it's implemented in asm.

> GMP should absolutely not play with FP rounding mode, 
> not even for some fringe configuration.

OK, things will be simpler that way :-)


More information about the gmp-devel mailing list