Raymond Hettinger schrieb: > My colleague got an odd result today that is reproducible on his build > of Python (RedHat's distribution of Py2.4.2) but not any other builds > I've checked (including an Ubuntu Py2.4.2 built with a later version of > GCC). I hypothesized that this was a bug in the underlying GCC > libraries, but the magnitude of the error is so large that that seems > implausible. Does anyone have a clue what is going-on? I'd say it's memory corruption. Look: r=array.array("d",[-194000000.0, -193995904.0, -193994880.0]).tostring() print map(ord,r[0:8]) print map(ord,r[8:16]) print map(ord,r[16:24]) gives [0, 0, 0, 0, 105, 32, 167, 193] [0, 0, 0, 0, 73, 32, 167, 193] [0, 0, 0, 0, 65, 32, 167, 193] It's only one byte that changes, and then that in only two bits (2**3 and 2**5). Could be faulty hardware, too. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4