Floating point minimum and maximum exponent values

Christian Heimes christian at python.org
Tue Jul 16 08:46:36 EDT 2013


Am 16.07.2013 14:04, schrieb Chris Angelico:
> Piece of extreme oddity, this.
> 
>>>> help(sys.float_info)
> .... lots of other info ...
>  |  max_exp
>  |      DBL_MAX_EXP -- maximum int e such that radix**(e-1) is representable
>  |
>  |  min_exp
>  |      DBL_MIN_EXP -- minimum int e such that radix**(e-1) is a
> normalized float
> ....
> 
> So it's technically correct. Followup question: Why is it off by one?

Because float.h defines DBL_MAX_EXP like that.

Why? I can't tell, too.




More information about the Python-list mailing list