float literal too large

Aahz Maruch aahz at netcom.com
Tue Jun 27 11:49:25 EDT 2000


In article <ulsntz2kra.fsf at runner.princeton.idaccr.org>,
Victor S. Miller <victor at idaccr.org> wrote:
>
>I just wrote a python program to read output produced by a Fortran
>program that somebody had written.  Much to my surprise I got the
>exception:
>
>float() literal too large.
>
>The literal in question was '0.23489798479873E-2325' (this was
>generated on a Cray computer).  

I'm guessing the exponent is too large (not the mantissa).  In case you
don't hear from someone who actually knows something about floats in
Python, I suggest you try different exponents to see if that is in fact
the problem.  If so, I suggest you create a string operation to manually
underflow this to zero (or possibly NumPy would help).
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

The best way to get information on Usenet is not to ask a question,
but to post the wrong information.  --Aahz



More information about the Python-list mailing list