| Karim Belabas on Mon, 25 Dec 2023 20:53:34 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Finding bitness of gp |
* 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/