can you help guys?

Ian Kelly ian.g.kelly at
Thu Apr 23 20:44:22 CEST 2015

On Thu, Apr 23, 2015 at 9:51 AM, brokolists <coreyahmet at> wrote:
> my problem is i m working with very long float numbers and i use
> numberx =float(( input( 'enter the number\n ')))
> after i use this command when i enter something more than 10 or 11 digits it uses like 1e+10 or something like that
> but i have to calculate it without scientific 'e' type. what can i do to solve this?
> (sorry for my bad english)

That's just how the number is formatted for output by default. It has
nothing to do with how the number is handled in memory. You can
prevent it from outputting scientific notation using the 'f' format
specifier. Pick whichever example best suits your use.

>>> num = 12345678901234567890.
>>> print(num)
>>> print('%f' % num)  # Using percent formatting
>>> print('{:f}'.format(num))  # Using the str.format method
>>> print(format(num, 'f'))  # Using the format builtin

Now, if you're working with very long floats then you're probably also
running into precision issues, as you can see in the examples above.
If the precision is important to you, then you may want to consider
using decimals instead of floats.

More information about the Python-list mailing list