Floating point overflow and underflow

Chris Angelico rosuav at gmail.com
Tue Jan 7 22:38:20 EST 2020


On Wed, Jan 8, 2020 at 2:18 PM Shashank Tiwari <shanky.tiwari at gmail.com> wrote:
>
> Thanks Chris. What if it's pow(2.2,0.45)?
>

Initialize your Decimals from strings, as you were already advised,
and do the calculation in Decimals.

Or just use floats, since it's likely to be at least as accurate.

ChrisA


More information about the Python-list mailing list