|
From: | Michael D Godfrey |
Subject: | Re: test failure for mappers.cc |
Date: | Tue, 09 Nov 2010 18:51:06 -0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Thunderbird/3.1.6 |
On 11/09/2010 09:42 AM, John W. Eaton wrote:
I think that any "hiding" of such errors is not good. If it is true that thisI'm not seeing the difference, but it is probably happening because I changed the float version of arg from float arg (float x) { return atan2 (0.0, x); } to float arg (float x) { return atan2f (0.0f, x); } It looks like your result is now off by about "2*eps ('single')". Does adding that as a tolerance avoid the warning? Even if it does, should we make the change? Shouldn't the atan2f function in your math library recognize -1 as a special case and return precisely the single precision value for pi? Should we be tweaking test tolerances to hide what might be considered bugs in system libraries? jwe atan2f is returning a value that is approx 2*eps less than pi there is likely a value for the argument close to -1 which produces a larger value, i.e. the approach to pi is not uniform. This would be a serious error. It would be good to verify this behavior and report the problem if necessary. Michael |
[Prev in Thread] | Current Thread | [Next in Thread] |