[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5e0ea7540f577c9684e272000fdfc80d29bb78a2 by Victor Stinner in branch 'master': bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515) https://github.com/python/cpython/commit/5e0ea7540f577c9684e272000fdfc80d29bb78a2 --

[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I failed to find time to convert attached tests to tests in the Python test suite. But I understood that existing tests should be enough to control the rounding mode. I removed the call. If something goes wrong, we can add it back. --

[issue37474] Should Py_Initialize() control the floating point mode?

2019-10-01 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +16105 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16515 ___ Python tracker ___

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark: Do you think that it's worth it to convert attached fp_except.c into > tests run by test_float, to check floating point exceptions in Python? Sure, it wouldn't harm. I'd expect that all these cases are already being tested indirectly by some part of

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-30 Thread STINNER Victor
STINNER Victor added the comment: Mark: Do you think that it's worth it to convert attached fp_except.c into tests run by test_float, to check floating point exceptions in Python? -- ___ Python tracker

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-30 Thread Mark Dickinson
Mark Dickinson added the comment: > And since it was only introduced Sorry, that was unclear. "it" refers to "fedisableexcept" in the above. -- ___ Python tracker ___

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-30 Thread Mark Dickinson
Mark Dickinson added the comment: > Should I understand that fedisableexcept(FE_OVERFLOW) is useless since > FreeBSD 6? That's my understanding, yes. And since it was only introduced in FreeBSD 6, it's been useless forever. IOW, I think it's true that this line of code, in its current

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-29 Thread STINNER Victor
STINNER Victor added the comment: fp_except.c: C program to test for float point exceptions: * FE_OVERFLOW * FE_UNDERFLOW * FE_INVALID I prefer to avoid testing FE_INEXACT which a test might be too specific to an implementation of the libm. I also chose to avoid testing FE_DIVBYZERO, since

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-29 Thread STINNER Victor
STINNER Victor added the comment: > The current FreeBSD documentation for fedisableexcept says: All exceptions > are masked by default. The fedisableexcept manual page says that since this manual page was added to FreeBSD 6.0 which was released in 2005. Python started to tune FPU control

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Mark Dickinson added the comment: The current FreeBSD documentation for fedisableexcept says: > All exceptions are masked by default. Source: https://www.freebsd.org/cgi/man.cgi?query=fedisableexcept=0=0=FreeBSD+12.0-RELEASE+and+Ports=default=html So it looks as though it may be safe to

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-03 Thread Mark Dickinson
Mark Dickinson added the comment: > What is the behavior on FreeBSD when fedisableexcept(FE_OVERFLOW) is not > called? That's an excellent question, that I'd love to have an answer to for currently supported FreeBSD versions. I think the old behaviour is that anything that you'd expect to

[issue37474] Should Py_Initialize() control the floating point mode?

2019-07-01 Thread STINNER Victor
New submission from STINNER Victor : Just after calling _PyRuntime_Initialize(), Py_Main() calls: /* 754 requires that FP exceptions run in "no stop" mode by default, * and until C vendors implement C99's ways to control FP exceptions, * Python requires non-stop mode. Alas, some