RH6.1 coredump: float("10.01")
Tim Peters
tim_one at email.msn.com
Mon May 8 02:09:52 EDT 2000
[Jeff Bauer]
> I recently discovered a problem using the built-in
> float() function on a client's RedHat 6.1 server.
>
> >>> float("10.01")
> Segmentation fault (core dumped)
>
> If I use float() or string.atof() against any string
> whose absolute value is greater than "10.0", I get
> a core dump.
>
> I've duplicated this problem in C (egcs-2.91.66)
> on this particular machine, so it's not a problem
> with the Python interpreter. No problem on various
> SuSE Linuxes using egcs-2.91.66.
Look for platform library (libc and/or libm) corruption or mismatch.
> The tim-bot will say it's my just desserts for even
> considering using floats in my code. <wink>
Na, this one is a result of not using Windows <wink>.
> If anyone can confirm this problem on RedHat 6.1
> (and even better, point me to a solution) ...
Try
1001L * 1.0 / 100L
Hehe.
> ...
> god-created-integers,-we-should-have-had-enough-
> sense-to-stop-there-ly y'rs,
I asked God about this last week! Surprisingly enough, it turns out He
actually created the reals, and views integers as a boring special case,
while viewing complex numbers as an hilarious generalization He never would
have thought of in a trillion eons. Like they say, He's mysterious.
he-took-it-like-a-man-though-ly y'rs - tim
More information about the Python-list
mailing list