No float limits

Bjorn Pettersen BPettersen at NAREX.com
Tue Jul 3 19:47:58 EDT 2001


> From: D-Man [mailto:dsh8290 at rit.edu]
> 
> On Tue, Jul 03, 2001 at 11:37:51PM +0200, Jürgen Hermann wrote:
> | Hi!
> | 
> | I just stumbled over the fact that there is sys.maxint, but 
> no sys.maxfloat
> | and sys.epsfloat. In case anyone thinks this is a valid 
> addition, I'll come
> | up with a patch.
> 
> What value would sys.maxfloat have?
> 
> IIRC IEEE754 states that all ones (ie 0xFFFFFFFF for a single
> precision float) means infinity, so there really isn't a "max" value
> for a float.

Perhaps not, but there is a maximum representable number, a.k.a. DBL_MAX
in your C library (same argument for DBL_EPSILON of course ;-)

-- bjorn




More information about the Python-list mailing list