lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] MinGW-w64 gcc-6.3.0 std::rint() anomaly


From: Vadim Zeitlin
Subject: Re: [lmi] MinGW-w64 gcc-6.3.0 std::rint() anomaly
Date: Thu, 24 Aug 2017 02:05:39 +0200

On Wed, 23 Aug 2017 23:54:09 +0000 Greg Chicares <address@hidden> wrote:

[...test results snipped...]
GC> This alternative test suggests the same conclusion. And the overall
GC> effect in lmi can hardly be greater, because lmi uses std::rint()
GC> only in 'round_to.cpp', and this unit test exercises round_to<>()
GC> more intensively than lmi itself does.

 FWIW I agree with your conclusions as tests demonstrate that there is no
observable slowdown due to the use of -frounding-math, but, in my
understanding, it affects much more than just the use of std::rint():
there are many arithmetic expressions involving floating point values that
can be simplified by the compiler without it, std::rint() here is just a
particularly egregious example as the compiler can optimize it away
completely, but there are other situations when simpler instructions can be
used with -fno-rounding-math. I could run the benchmarks if you'd like to,
but I think it might affect the code using SSE (where, of course, the
optimization attempts of gcc developers are concentrated as vanishingly few
people use x87 any more) more than the current lmi builds.

GC> Professor Kahan got all this stuff right in the 1970s. We must organize
GC> marches in major cities the world over to raise IEEE754 consciousness.

 If you want a revolution in IEEE-754 support, you can count me out, in.
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]