Looking for the greatest negative float value

Fernando Perez fperez528 at yahoo.com
Wed Jun 11 22:13:00 CEST 2003


Gilles Lenfant wrote:

> I need the same as...
> 
> import sys
> negmaxint = - sys.maxint -1
> 
> ... but for float data
> 
> any hint ?
>

You want the kinds package, part of Numeric:


In [2]: import kinds

In [3]: kinds.default_float_kind.M
kinds.default_float_kind.MAX         kinds.default_float_kind.MIN
kinds.default_float_kind.MAX_10_EXP  kinds.default_float_kind.MIN_10_EXP
kinds.default_float_kind.MAX_EXP     kinds.default_float_kind.MIN_EXP

In [3]: kinds.default_float_kind.MIN
Out[3]: 2.2250738585072014e-308

Best,

f.




More information about the Python-list mailing list