4 ms·
Some kind of internal state specific to Microsoft's libm? It doesn't look like _fpreset() is present anywhere else. Though in general, IEEE-754 math does have
by wiml 6y ago
Some kind of internal state specific to Microsoft's libm? It doesn't look like _fpreset() is present anywhere else.
Though in general, IEEE-754 math does have a small amount of global state, for stuff like rounding modes and subnormals. Perhaps the spawned thread's fenv was unexpected.
I'm not super convinced by this blog post anyway, since it immediately confuses associativity with commutativity.
- zaitanz 6y agoOp here. Yea this only occurs on Windows with MinGW. Visual C++ and Clang do not have this issue. None of the Linux compilers I tested also had this issue. And yea you're right on the associative mistake. Will correct this :)
- chrchang523 6y agoI currently build Windows binaries via cross-compilation on Linux using gcc-mingw-w64; I assume that is affected by the bug?
- zaitanz 6y agoMost likely. You can check with the pastebin code https://pastebin.com/thTapSgn https://pastebin.com/thTapSgn . Local and Thread outputs should be the same.