[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate resul
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result. |
Date: |
Sun, 25 Mar 2018 10:15:57 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #2, bug #53462 (project octave):
For inf*i, Octave computes inf * complex (0, 1), which produces complex (NaN,
Inf), so I think angle is doing the right thing to return NaN for that value.
What happens for you if you do
angle (complex (0, Inf))
angle (complex (NaN, Inf))
angle (complex (Inf, NaN))
angle (complex (NaN, NaN))
angle (complex (Inf, Inf))
in both Octave and Matlab?
If these all agree, then I think the actual "problem" is that Octave doesn't
have a special case for Inf * i. The real issue here is that Octave (and
Matlab) don't have pure imaginary numbers. So given that, the question is
what (if any) special cases should be handled for operations when the real
part of a complex number is zero. We've been over this issue a number of
times before, and it's not clear to me what the correct thing is.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53462>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result., Dildar Sk, 2018/03/25
- [Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result., Dildar Sk, 2018/03/25
- [Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result.,
John W. Eaton <=
- [Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result., John W. Eaton, 2018/03/25
- [Octave-bug-tracker] [bug #53462] angle(0+xi) producing inaccurate result., Dildar Sk, 2018/03/25
- [Octave-bug-tracker] [bug #53462] Inf*i is not equivalent to complex(0, Inf), Mike Miller, 2018/03/26
- [Octave-bug-tracker] [bug #53462] Inf*i is not equivalent to complex(0, Inf), Mike Miller, 2018/03/26
- [Octave-bug-tracker] [bug #53462] Inf*i is not equivalent to complex(0, Inf), Mike Miller, 2018/03/26
- [Octave-bug-tracker] [bug #53462] Inf*i is not equivalent to complex(0, Inf), Rik, 2018/03/26
- [Octave-bug-tracker] [bug #53462] Inf*i is not equivalent to complex(0, Inf), Mike Miller, 2018/03/26