[Bug 37149] python 3.1.1: test_cmath failed

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Sep 11 18:05:58 CDT 2018


https://bugs.winehq.org/show_bug.cgi?id=37149

Alex Henrie <alexhenrie24 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexhenrie24 at gmail.com

--- Comment #2 from Alex Henrie <alexhenrie24 at gmail.com> ---
The cmath tests pass after running `winetricks vcrun2008`.

I actually don't think that there is a bug here at all. The MSVC
implementations of these math functions are slightly more accurate and the
glibc implementations have slightly better performance. Python 3.1.1 sets the
FPU to extended precision (80 bits) on Linux, presumably to force glibc to give
results that are as accurate as MSVC.[1] However, if we make Wine always set
the extended precision flag before calling a glibc math function, we could see
an unacceptable slowdown in programs that don't require exact values. So the
only way to truly "fix the bug" would be to stop relying on glibc and instead
write our own math function implementations that make the same
performance/accuracy tradeoffs as the Microsoft implementations. I don't think
it's worth the effort, especially since the tradeoffs that Microsoft chose
could be different in different MSVC versions or on different CPU
architectures.

TLDR: If you need more accurate math in Wine, I recommend installing vcrun2008
or complaining to the GCC developers.

[1]
https://github.com/python/cpython/blob/586547387b468ffb391cb76842f65e68164e5135/Modules/fpectlmodule.c#L227

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list