RE: C Module's '1.#INF' changes to 'inf' at Python

2010-01-11 Thread CELEN Erman
Numeric.log10() will check to see if the errno was set to ERANGE. It does not check if a floating point exception flag was set, which is tricky to do across platforms. The newer numpy can do it because we've finally managed to implement all of that platform-specific code, but the

Re: C Module's '1.#INF' changes to 'inf' at Python

2010-01-11 Thread Robert Kern
On 2010-01-11 12:27 PM, CELEN Erman wrote: Numeric.log10() will check to see if the errno was set to ERANGE. It does not check if a floating point exception flag was set, which is tricky to do across platforms. The newer numpy can do it because we've finally managed to implement all of that

RE: C Module's '1.#INF' changes to 'inf' at Python

2010-01-11 Thread CELEN Erman
(I also noticed that this behavior is same under standard NumPy 1.4 with standard Python 2.6 on Windows. If you call numpy.log10(0.0) you will get an -inf and no exceptions will be raised. Which is not the case with Python's standard math.log10(0.0) which will raise a ValueError)

Re: C Module's '1.#INF' changes to 'inf' at Python

2010-01-11 Thread Robert Kern
On 2010-01-11 14:31 PM, CELEN Erman wrote: (I also noticed that this behavior is same under standard NumPy 1.4 with standard Python 2.6 on Windows. If you call numpy.log10(0.0) you will get an -inf and no exceptions will be raised. Which is not the case with Python's standard math.log10(0.0)

Re: C Module's '1.#INF' changes to 'inf' at Python

2010-01-09 Thread Mark Dickinson
On Jan 8, 3:36 pm, Robert Kern robert.k...@gmail.com wrote: On 2010-01-08 07:48 AM, CELEN Erman wrote: My problem is that I’ve noticed a strange behavior in Python while handling FPEs on Windows after switching compilers (msvc8 to msvc9) and I am trying to find out how Python handles INF

Re: C Module's '1.#INF' changes to 'inf' at Python

2010-01-08 Thread Robert Kern
On 2010-01-08 07:48 AM, CELEN Erman wrote: Hi All, My problem is that I’ve noticed a strange behavior in Python while handling FPEs on Windows after switching compilers (msvc8 to msvc9) and I am trying to find out how Python handles INF values to figure out where the problem might be. The