octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #57671] Power operator operating on complex nu


From: Rik
Subject: [Octave-bug-tracker] [bug #57671] Power operator operating on complex numbers results in NaN when broadcasting
Date: Sun, 26 Jan 2020 20:35:49 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #57671 (project octave):

                Category:                    None => Interpreter            
                Severity:              3 - Normal => 4 - Important          
              Item Group:                    None => Incorrect Result       
                  Status:                    None => Confirmed              
                 Release:                   4.2.2 => dev                    
                 Summary: Complex numbers in array gives NaN => Power operator
operating on complex numbers results in NaN when broadcasting

    _______________________________________________________

Follow-up Comment #2:

Bumping the version up to "dev" since this is still present.  The issue seems
to be related to broadcasting and I have changed the Summary to reflect that.

A simple test case with broadcasting that fails is


([1;0]*j) .^ [1, 0]
ans =

   0.0000 + 1.0000i   1.0000 +      0i
        0 +      0i      NaN -    NaNi


But if the matrices are full and there is no broadcasting then this works


([1,1; 0,0]*j) .^ [1, 0; 1, 0]
ans =

   0 + 1i   1 + 0i
   0 + 0i   1 + 0i




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57671>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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