[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45507] acos returns different results on big
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #45507] acos returns different results on big input values |
Date: |
Fri, 29 Jan 2016 10:11:42 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #7, bug #45507 (project octave):
Thanks for checking, Hartmut.
The problem with the previous patch was the use of 'abs' instead of 'fabs'.
The attached patch passes Marco's tests. Thanks Marco! That script was really
helpful, both as a benchmark and showing how to avoid the cancellations.
It also passes make check (although it slightly widens the tolerance on one
test).
I've tried to avoid the double sqrt; the patch could be made slightly shorter
and presumably slightly slower by using the double square root. That is a
matter of taste for whoever applies the patch.
(file #36198)
_______________________________________________________
Additional Item Attachment:
File name: bug_45507.v2.cset Size:6 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45507>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/