Looking for the greatest negative float value
bokr at oz.net
Wed Jun 11 22:36:38 CEST 2003
On Wed, 11 Jun 2003 18:52:17 +0200, "Gilles Lenfant" <glenfant at NOSPAM.bigfoot.com> wrote:
>I need the same as...
>negmaxint = - sys.maxint -1
>... but for float data
>any hint ?
To get what you want (wyw) maybe you have to compute it. E.g.,
>>> fmin = -1.0
>>> while 1:
... fnext = fmin*2.0-1.0
... if fnext==fmin: break
... wyw = fmin
... fmin = fnext
I'm not sure how portable this is, but the actual value
can surely vary according to platform. I suppose you could set up a site-specific
initialization to put such a value as sys.minfloat if you wanted to.
The timbot will have the best info ;-)
More information about the Python-list