Bill Allombert on Sun, 08 Jun 2008 22:17:36 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: integer n-roots like sqrtint()


On Tue, Feb 05, 2008 at 10:29:46AM +0100, Bill Allombert wrote:
> On Tue, Feb 05, 2008 at 08:31:27AM +0100, Jeroen Demeyer wrote:
> > I'm wondering if this can be considered a bug in PARI.  Do you think it 
> 
> Well, sqrtn could be slightly more accurate since 6. is exactly
> representable.
> 
> > makes sense to change the implementation of sqrtn() to first call 
> > ispower() when the argument is an exact integer?
> 
> If we improve sqrtn accuracy we should do it for all input, not just
> perfect powers.

And indeed Karim did just that in revision 10203 and now we get
? \p100
   realprecision = 105 significant digits (100 digits displayed)
? floor(sqrtn(6^3,3))
%1 = 6

Cheers,
Bill.