The current PyLong implementation represents arbitrary precision integers
in units of 15 or 30 bits. I presume the purpose is to avoid overflow in
addition , subtraction and multiplication. But compilers these days offer
intrinsics that allow one to access the overflow flag, and to obtain the
resul
2017-07-03 6:52 GMT+02:00 Siyuan Ren :
> The current PyLong implementation represents arbitrary precision integers in
> units of 15 or 30 bits. I presume the purpose is to avoid overflow in
> addition , subtraction and multiplication. But compilers these days offer
> intrinsics that allow one to ac
On Mon, Jul 3, 2017 at 5:52 AM, Siyuan Ren wrote:
> The current PyLong implementation represents arbitrary precision integers in
> units of 15 or 30 bits. I presume the purpose is to avoid overflow in
> addition , subtraction and multiplication. But compilers these days offer
> intrinsics that all
On 05/07/2017 20:05, Mark Dickinson wrote:
Oh, and you'd have to rewrite the power algorithm, which currently
depends on the size of a limb in bytes being a multiple of 5. :-)
What is a limb, as my search foo has let me down?
--
My fellow Pythonistas, ask not what our language can do for you
On Thu, Jul 6, 2017 at 5:33 AM, Mark Lawrence via Python-Dev
wrote:
> On 05/07/2017 20:05, Mark Dickinson wrote:
>
>> Oh, and you'd have to rewrite the power algorithm, which currently
>> depends on the size of a limb in bytes being a multiple of 5. :-)
>>
>
> What is a limb, as my search foo has
On Wed, Jul 5, 2017 at 12:05 PM Mark Dickinson wrote:
> On Mon, Jul 3, 2017 at 5:52 AM, Siyuan Ren wrote:
> > The current PyLong implementation represents arbitrary precision
> integers in
> > units of 15 or 30 bits. I presume the purpose is to avoid overflow in
> > addition , subtraction and mu