String to Float, without introducing errors

Chris Angelico rosuav at gmail.com
Sun Dec 18 17:25:17 EST 2022


On Mon, 19 Dec 2022 at 07:57, Stefan Ram <ram at zedat.fu-berlin.de> wrote:
> G = Decimal( 6.6743015E-11 )
> r = Decimal( 6.371E6 )
> M = Decimal( 5.9722E24 )

What's the point of using Decimal if you start with nothing more than
float accuracy?

ChrisA


More information about the Python-list mailing list