|
From: | Robert Jacobs |
Subject: | [Octave-bug-tracker] [bug #39044] sign function gives wrong answer for complex numbers. |
Date: | Wed, 22 May 2013 21:21:26 +0000 |
User-agent: | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3) |
URL: <http://savannah.gnu.org/bugs/?39044> Summary: sign function gives wrong answer for complex numbers. Project: GNU Octave Submitted by: robertlj52 Submitted on: Wed 22 May 2013 09:21:25 PM GMT Category: Octave Function Severity: 3 - Normal Priority: 5 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Robert Jacobs Originator Email: Open/Closed: Open Discussion Lock: Any Release: 3.6.4 Operating System: Microsoft Windows _______________________________________________________ Details: According to your documentation. For complex arguments, `sign' returns `x ./ abs (X)' But wikipedia defines a complex sign as 'x ./ (abs(x^2))' Example: a = 3 - 4i; sign(a) ans = 0.60000 - 0.80000i a ./ sqrt(a.*a) ans = 1 _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?39044> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |