Charles Greathouse on Mon, 30 Jan 2017 18:41:24 +0100
[
Date Prev
] [
Date Next
] [
Thread Prev
] [
Thread Next
] [
Date Index
] [
Thread Index
]
Number of 32-bit words in an integer
To
:
pari-dev@pari.math.u-bordeaux.fr
Subject
: Number of 32-bit words in an integer
From
: Charles Greathouse <
charles.greathouse@case.edu
>
Date
: Mon, 30 Jan 2017 12:40:50 -0500
Delivery-date
: Mon, 30 Jan 2017 18:41:25 +0100
Is there a nicer way to compute the number of 32-bit words in a given integer than what I'm doing now?
#ifdef LONG_IS_64BIT
long words = (lgefint(n) - 2) << 1;
if ((ulong)*int_MSW(n) <= 0xFFFFFFFF)
words--;
#else
long words = lgefint(n) - 2;
#endif
Charles Greathouse
Case Western Reserve University
Follow-Ups
:
Re: Number of 32-bit words in an integer
From:
Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
Re: Number of 32-bit words in an integer
From:
Jacques Gélinas <jacquesg00@hotmail.com>
Prev by Date:
Re: Use PROT_NONE for unused virtual stack memory
Next by Date:
Re: Number of 32-bit words in an integer
Previous by thread:
Re: a kit for cross-compiling pari for mingw on linux
Next by thread:
Re: Number of 32-bit words in an integer
Index(es):
Date
Thread