[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] MinGW-w64 roundl() anomaly
From: |
Greg Chicares |
Subject: |
[lmi] MinGW-w64 roundl() anomaly |
Date: |
Thu, 15 Dec 2016 16:02:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 |
'round_test.cpp' doesn't pretend to be a comprehensive validation suite
for the round() family, but it always succeeded with mingw.org's RTL
supplement (libmingwex), yet it fails with MinGW-w64. AFAICS, the only
problem it detects is
roundl(0.499999999999999999973)
which I believe should always return 0.0L regardless of the current
hardware rounding mode. It seems to do that iff the current mode is
upward rounding--not if it's downward, toward zero, or to nearest.
Because this function is supposed to round to nearest always, I'd
expect its implementation to start by setting that mode, so an error
like this seems strange; but perhaps it's easy to fix.
Vadim, would you be interested in verifying my analysis and, if it's
correct, following up with the MinGW-w64 people to get this fixed?
- [lmi] MinGW-w64 roundl() anomaly,
Greg Chicares <=