Mar-19-2019, 06:29 PM
If you want a number formatted a certain way, then you probably want to use string formatting. Or the decimal module, depending on how exact you want it:
C:\Users\nilamo>python -c "print('{0:.10f}'.format(0.0000006 + 0.0000008))" 0.0000014000 C:\Users\nilamo>python -c "from decimal import Decimal; print(Decimal(0.0000006 + 0.0000008))" 0.000001399999999999999936647356556240762159859514213167130947113037109375 C:\Users\nilamo>python -c "from decimal import Decimal; print(Decimal(0.0000006) + Decimal(0.0000008))" 0.000001399999999999999936647356556