Subject: | sqrtint() output is one too large |
I am unsure whether this is a bug in Pari or Math::Pari, but the Pari documentation at http://pari.math.u-bordeaux.fr/dochtml/html/Arithmetic_functions.html says about sqrtint():
"Returns the integer square root of x, i.e. the largest integer y such that y^2 ≤ x, where x a non-negative integer."
In that case, the following should return 99999999, not 100000000:
$ perl -MMath::Pari -wle '$x = PARI("9999999999999999"); print Math::Pari::sqrtint($x)'
100000000