1

I'm having hard time converting the following numbers for example:

-1.9443404027234424e+46
-1.9443404027234425e+36

in a format without the scientific notation (AKA a float like 0.04256 for example).

Selcuk
  • 57,004
  • 12
  • 102
  • 110
Max
  • 67
  • 6
  • Does this answer your question? [Convert scientific notation to decimals](https://stackoverflow.com/questions/29849445/convert-scientific-notation-to-decimals) – Nk03 Jul 11 '21 at 14:09

1 Answers1

4

You can use the :f format specifier:

>>> print("{:.0f}".format(-1.9443404027234424e+46))
-19443404027234423757622069004479676797119627264

Note that the result may not end with 46 zeros because of floating point precision.

Selcuk
  • 57,004
  • 12
  • 102
  • 110