octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #45507] acos returns different results on big


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #45507] acos returns different results on big input values
Date: Thu, 16 Jul 2015 10:04:59 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:39.0) Gecko/20100101 Firefox/39.0

Follow-up Comment #3, bug #45507 (project octave):

Hi, I'm on 3.8.2, and I see several discrepancies or NaN (try, e.g.,
asin(1e8)). Some of them are related to the evaluation of quantities like
z+sqrt(z^2-1) which, for large negative numbers z, are z+|z| and therefore 0.
Moreover, sqrt(z^2-1) may overflow for z>sqrt(realmax). So, I wrote a test
file for acos, asin, acosh and asinh. If I run it on Matlab 2014, the results
are always correct. The test file should help in the correct implementation.

Marco

(file #34451)
    _______________________________________________________

Additional Item Attachment:

File name: testx3.m                       Size:2 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45507>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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