|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #43349] asin() behaves differently from Matlab for arguments larger than 1 |
Date: | Mon, 06 Oct 2014 21:04:38 +0000 |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 |
Follow-up Comment #12, bug #43349 (project octave): @Michael: Yes, there would need to be a review of most of the mapping functions in lo-mappers.cc to see if this change needs to be done. Maybe we could interest someone in doing that, or maybe it has to wait until the next GSOC round? I tried to test in R using an online execution engine but the result I get is NaN. I think it's good enough validation that Mathematica and Matlab use the same convention. Another possible implementation would be to use copysign instead of the tertiary operator `?'. I don't know which would be faster. return fabs (x) > 1.0 ? asin (Complex (x, copysign (x, 0.0))) : Complex (asin (x)); _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43349> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |