Re: Finding bitprecision

Bill Allombert <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <ZYFnYr7cxQC+h44O@seventeen>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.