Re: NaN support etc.

2005-05-19 Thread Andreas Beyer
/Sébastien Boisgérault wrote:/ > But, practically, I have never found a platform where > the following fpconst-like code did not work: > > import struct > cast = struct.pack > > big_endian = cast('i',1)[0] != '\x01' > if big_endian: >nan = cast('d', '\x7F\xF8\x00\x00\x00\x00\x00\x00')[0] > els

Re: NaN support etc.

2005-05-18 Thread Ivan Van Laningham
Hi All-- "Martin v. Löwis" wrote: > > Andreas Beyer wrote: > > How do I find out if NaN, infinity and alike is supported on the current > > python platform? > > To rephrase Sebastian's (correct) answer: by > > 1. studying the documentation of the CPU vendor > 2. studying the documentation of th

Re: NaN support etc.

2005-05-18 Thread Sébastien Boisgérault
Martin v. Löwis a écrit : > Andreas Beyer wrote: > > How do I find out if NaN, infinity and alike is supported on the current > > python platform? > > To rephrase Sebastian's (correct) answer: by > > 1. studying the documentation of the CPU vendor > 2. studying the documentation of the compiler ve

Re: NaN support etc.

2005-05-18 Thread "Martin v. Löwis"
Andreas Beyer wrote: > How do I find out if NaN, infinity and alike is supported on the current > python platform? To rephrase Sebastian's (correct) answer: by 1. studying the documentation of the CPU vendor 2. studying the documentation of the compiler vendor, and performing extensive tests o

Re: NaN support etc.

2005-05-18 Thread Sébastien Boisgérault
Search for: + fpconst / PEP 754 + Tim Peters IEEE 754 accident """what-the-world-needs-now-is-nannanny.py-ly y'rs"" - SB -- http://mail.python.org/mailman/listinfo/python-list