[Top][All Lists]

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

[Octave-bug-tracker] [bug #35024] magnitude abs(a) != sqrt(a_r^2 + a_i^2

From: anonymous
Subject: [Octave-bug-tracker] [bug #35024] magnitude abs(a) != sqrt(a_r^2 + a_i^2)
Date: Fri, 09 Dec 2011 07:40:09 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0


                 Summary: magnitude abs(a) != sqrt(a_r^2 + a_i^2)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 09 Dec 2011 07:40:08 UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Edward Meewis
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: Microsoft Windows



The magnitude of a complex number a must be equal to sqrt(real(a)*real(a) +
imag(a)*imag(a)). It isn't.

To reproduce:
>> a = 2+3i
>> abs(a) - sqrt(13)
ans = 4.4409e-016

>> abs(a) - sqrt(real(a)*real(a) + imag(a)*imag(a))
ans = 4.4409e-016


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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