codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Floating point overflow and underflow


On Wed, Jan 8, 2020 at 1:37 PM Shashank Tiwari <shanky.tiwari at gmail.com> wrote:
>
> Thanks Rob.
>
> How would one initialize a Decimal with something like pow(2,256)?
>

Easy, just initialize it with an integer:

>>> Decimal(2**256)
Decimal('115792089237316195423570985008687907853269984665640564039457584007913129639936')

ChrisA