[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: Merged to py3k in r69465. -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mail

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-02-09 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed (I hope!) in the trunk in r69459. I'll wait for buildbot results (just in case) and then merge to 2.6, 3.1 and 3.0. The same test_cmath failure can also be seen on OS X 10.5.6/Intel when compiling with -fmpmath=387. Annoyingly, the fix above doesn't w

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: Answering my own question, there *are* pitfalls: (X) > DBL_LONG_MAX will evaluate to true for some finite extended precision values that are *just* larger than DBL_LONG_MAX, but nevertheless round to DBL_LONG_MAX rather than infinity. Another not-so-bright i

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: s/false positives/false negatives/ ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: Tim, I'm in need of some advice on Py_IS_INFINITY. It's currently implemented (on platforms that don't provide isinf) as #define Py_IS_INFINITY(X) ((X) && (X)*0.5 == (X)) I'd like to rewrite it as something like: #define Py_IS_INFINITY_D(X) ((X) < -DBL_MAX |

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2009-01-04 Thread Mark Dickinson
Mark Dickinson added the comment: Looking at this again, I don't like my solution. I think it would be better to fix Py_IS_INFINITY directly, putting all the complication into one place; then users of Py_IS_INFINITY don't have to spend time worrying about whether they should be calling Py_FO

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-23 Thread Mark Dickinson
Mark Dickinson added the comment: Final patch. Skip, could you please give this one a try, and then with any luck this can be fixed for 3.0.1. (Sorry for creating more work; this should be the last time.) I've added a configure test that detects x87 FPU usage, via the double rounding issu

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Skip. Looks like this problem is 'solved in principle'. Now I have to figure out a non-hackish solution. ___ Python tracker ___ __

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-15 Thread Skip Montanaro
Skip Montanaro added the comment: Took me awhile to locate a SPARC C compiler on our dwindling set of Solaris/SPARC boxes at work, but I eventually found one and got Subversion trunk to compile. test_cmath and test_math both pass with the force_to_memory2 patch. I don't know if I mentioned it

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: > The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c) > is attached. The result don't depend from optimisation flag. Thanks, Roumen. I rather suspected that Py_IS_INFINITY was dodgy this way. On the other hand, this is only a problem whe

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c) is attached. The result don't depend from optimisation flag. isinf(x)=1 Py_IS_INFINITY(x)=0 Py_IS_INFINITY2(x)=1 isinf(x)=0 Py_IS_INFINITY(x)=0 Py_IS_INFINITY2(x)=0 Added file: http://bugs

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: about "export" decoration it is find in then patch PyAPI_FUNC(double) . found it after second review ___ Python tracker ___ __

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: As Skip Montanaro report that work on ... may be macro from pymath.h has to be changed to force conversion to double. ___ Python tracker ___ _

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: I'm not sure that patch has to deal with "force to memory". FYI: when I port python trunk to mingw platform I encounter some inconsistency for isinf. My note about issue follow: - configure.in: ... dnl FIXME: For mingw "isinf" is a macro defined in and can't be

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Skip Montanaro
Skip Montanaro added the comment: Mark> Skip, could you give it a try? Works for me on Solaris 10/x86. Based on Roumen's comment I am preparing to try it on Mac OS X/x86 and Solaris 10/sparc. Skip ___ Python tracker

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: may be proposed patch break platforms that need specific "export" decoration -- nosy: +rpetrov ___ Python tracker ___ ___

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (force_to_memory2.patch) that I'm hoping fixes the cmath test failures on Solaris 10/x86. Skip, could you give it a try? The patch isn't final: I need to look for more places where Py_FORCE_DOUBLE should be applied. But I'll wait to find out

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-07 Thread Mark Dickinson
New submission from Mark Dickinson <[EMAIL PROTECTED]>: In issue 4506, Skip reported that test_cmath fails on Solaris 10/x86 for 3.0. If my guesses are correct, it probably fails on all x86 systems that (a) use the x87 coprocessor for floating-point (as opposed to using SSE2, for example), an