[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45507] acos returns different results on big
From: |
H. G. |
Subject: |
[Octave-bug-tracker] [bug #45507] acos returns different results on big input values |
Date: |
Thu, 09 Jul 2015 18:53:01 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 |
URL:
<http://savannah.gnu.org/bugs/?45507>
Summary: acos returns different results on big input values
Project: GNU Octave
Submitted by: hardy
Submitted on: Do 09 Jul 2015 18:53:00 GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Regression
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: Any
_______________________________________________________
Details:
Here is a tiny "script" to show the behavior:
acos(1e7)
acos(1e8)
This gives you different results, depending where you run it (Octave 3.8.2,
Octave 4.0.0, or Matlab):
* The first calculation returns acos(1e7) = 0 + 16.8 i in all three programs.
* The second calculation returnes acos(1e8) = 0 + 19.1 i in Matlab. It
returnes the same value in Octave 3.8.2.
* But in Octave 4.0.0 the result of the second line now is acos(1e8) = NaN +
Inf i .
So Octave WAS behaving Matlab compatible here, but version 4.0.0 is NOT Matlab
compatible any more in this case!
I don't know if acos is well defined for input values >1 at all. But Matlab
decided to always returns something with a real part of 0, for big input
numbers. Octave did the same, but now (version 4.0.0) it suprisingly "jumps"
from a real part of 0 up to a real part of NaN somewhere between 1e7 and 1e8.
I have observed this change in behavior on the Linux release versions as well
as on the Windows release versions (3.8.2-3 mxe inofficial built, 4.0.0
official release).
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45507>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45507] acos returns different results on big input values,
H. G. <=