Re: Finding bitness of gp

Karim Belabas <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
* Ilya Zakharevich [2023-12-25 17:04]:
> On Sun, Dec 24, 2023 at 10:28:03PM -0800, Ilya Zakharevich wrote:
> > On Tue, Dec 19, 2023 at 10:50:26AM +0100, Bill Allombert wrote:
> > > > Should not there be O(1) way to find the current localbitprecision()?
> > 
> > > Yes, it is called getlocalbitprec().
> > 
> > As you could see from this mail thread, this name is not discoverable.¹⁾
> 
> Another missing (or not discoverable) piece of info: bitness of gp.
> It seems to be silly (and very slow with high \p) to do
> 
>   (08:01) gp > bitprecision(bitprecision(1.,1))
>   %2142 = 64

It's documented in develop.tex that

  sizebyte(0)==16

can (and, for now, should) be used to detect 64-bit arch. And

  sizebyte(0)==8

for 32 bits.

Cheers,

    K.B.
-- 
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
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.