Print a float number in normal form, not exponential form / scientific notation

Question:

I have a number that prints out in exponential form:

>>>
>>> a = 1/1221759
>>> print(a)
8.184920266599223e-07
>>>

How can i make it print in normal form?

Asked By: kafedakias

||

Answers:

You can format it as a fixed-point number.

>>> a = 1/1221759
>>> '{0:.10f}'.format(a)
'0.0000008185'
Answered By: Jeff Mercado

You can use print formatting:

print "%.16f" % a

where 16 is the number of digits you want after the decimal point.

Answered By: Jimtronic