I'm having a few issues with a Python program in that I am performing decimal calculations on and most values come up as desired, however every so often, when there is a very small decimal, the number is represented like "6.80E-7" rather than the desired "0.000000680". Here's a snippet of the code that I'm using:
import decimal decimal.getcontext().prec = 9 now = "230.939809280" then = "230.939808600" print str(decimal.Decimal(now) - decimal.Decimal(then))
This gives the following response:
Does anyone know of a way for me to display this output as "0.000000680" instead?
Any help would be most appreciated :)