[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol |
Date: |
Fri, 06 May 2016 16:58:18 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0 |
Follow-up Comment #1, bug #47865 (project octave):
This looks related to bug #45810 which was marked as fixed.
The Matlab documentation string for cplxpair is here
(http://www.mathworks.com/help/matlab/ref/cplxpair.html) and it doesn't
mention anything about the tolerance being in the range 0 to 1.
However, the description of tolerance is ambiguous.
A default tolerance of 100*eps relative to abs(A(i)) determines which numbers
are real and which elements are paired complex conjugates.
I'm not sure exactly how to interpret that. Octave has chosen to interpret it
as
100 * eps (abs (A(i)))
But it would be quicker if we could calculate
100 * eps * abs (A(i))
It's not quite the same thing as you can see below
octave:1> eps (1000)
ans = 1.1369e-13
octave:2> eps*1000
ans = 2.2204e-13
In any case, Octave may have the correct default tolerance, but Matlab uses an
entirely different method of determining the tolerance when a value is
specified.
The only way to go about this is to test different inputs to the cplxpair
function and see what happens.
Try the test case from bug #45810
z2 = [2000 * (1+eps) + 4j; 2000 * (1-eps) - 4j];
What do the following do under Matlab?
cplxpair (z2, -0.1)
cplxpair (z2, 0)
cplxpair (z2, 0.99)
cplxpair (z2, 1)
cplxpair (z2, 2)
If you are right that tolerance is in the range [0,1) then three of the
statements should produce an error.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47865>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, anonymous, 2016/05/06
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol,
Rik <=
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Rik, 2016/05/06
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Rik, 2016/05/07
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, anonymous, 2016/05/09
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Rik, 2016/05/10
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Gene, 2016/05/11
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Rik, 2016/05/11
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Gene, 2016/05/13
- [Octave-bug-tracker] [bug #47865] cplxpair(array, tol) uses wrong units for tol, Rik, 2016/05/13