Bill Allombert on Tue, 19 Dec 2023 10:50:30 +0100


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

Re: Finding bitprecision


On Mon, Dec 18, 2023 at 10:20:54PM -0800, Ilya Zakharevich wrote:
> Should not there be O(1) way to find the current localbitprecision()?
> 
>   (22:17) gp > localprec(10000);   my(s); for(n=1,100000,  s+=bitprecision(1.));
>   time = 78 ms.
>   (22:17) gp > localprec(1000000); my(s); for(n=1,100000,  s+=bitprecision(1.));
>   time = 2,121 ms.

Yes, it is called getlocalbitprec().

Cheers,
Bill