Exponential Notation and integers

Erik Max Francis max at alcyone.com
Thu Nov 18 18:49:46 EST 2004


Timothy Fitz wrote:

> Why are all numberical literals in exponential notation floats? To me
> it is counter-intuitive for 1e3 to behave so fundamentally different
> from 1000.

Probably primarily by convention.  Most language use computerized 
scientific notation to represent floating point numbers, not integers. 
It makes sense, after all:  should 1.344e3 be an int, but 1.344e2 be a 
float?

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   I'll have to get over this sooner or later. Why not now?
   -- Louis Wu



More information about the Python-list mailing list