Strange behaviour with numbers in exponential notation

Marko Rauhamaa marko at pacujo.net
Fri Sep 2 15:30:49 EDT 2016


Christian Gollwitzer <auriocus at gmx.de>:

> Am 02.09.16 um 19:24 schrieb Marco Sulla:
>> float has an 'exponentfloat' syntax. Why integers does not have an
>> equivalent syntax?
>
> Tradition? All languages I know of treat a number with an exponent as
> floating point.

Approximate real numbers are mostly needed by scientific applications,
and floats do the job marvelously.

Unlike many programming languages, Python has adopted big integers,
which have immediate applications in cryptography. Those big integers
hardly ever involve powers of ten, however, and they cannot be
approximated. So the scientific notation doesn't offer any notational
advantage.


Marko



More information about the Python-list mailing list