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

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

[Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #50124] cplxpair produces incorrect result for second column of complex pairs
Date: Mon, 23 Jan 2017 03:41:47 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #3, bug #50124 (project octave):

matlab 2016b output for the test script:


>> z = exp (2i*pi*[4; 3; 5; 2; 6; 1; 0]/7);
>> y = [ -1-1i; -1+1i;-3; -2; 1; 2; 3];
>> [z,y]
ans =
  -0.9010 - 0.4339i  -1.0000 - 1.0000i
  -0.9010 + 0.4339i  -1.0000 + 1.0000i
  -0.2225 - 0.9749i  -3.0000 + 0.0000i
  -0.2225 + 0.9749i  -2.0000 + 0.0000i
   0.6235 - 0.7818i   1.0000 + 0.0000i
   0.6235 + 0.7818i   2.0000 + 0.0000i
   1.0000 + 0.0000i   3.0000 + 0.0000i
>> cplxpair([z,y])
ans =
  -0.9010 - 0.4339i  -1.0000 - 1.0000i
  -0.9010 + 0.4339i  -1.0000 + 1.0000i
  -0.2225 - 0.9749i  -3.0000 + 0.0000i
  -0.2225 + 0.9749i  -2.0000 + 0.0000i
   0.6235 - 0.7818i   1.0000 + 0.0000i
   0.6235 + 0.7818i   2.0000 + 0.0000i
   1.0000 + 0.0000i   3.0000 + 0.0000i
>> cplxpair([z,y]) - [z,y]
ans =
   1.0e-15 *
   0.1110 - 0.2220i   0.0000 + 0.0000i
   0.0000 + 0.0000i   0.0000 + 0.0000i
   0.2498 + 0.0000i   0.0000 + 0.0000i
   0.0000 + 0.0000i   0.0000 + 0.0000i
   0.2220 + 0.1110i   0.0000 + 0.0000i
   0.0000 + 0.0000i   0.0000 + 0.0000i
   0.0000 + 0.0000i   0.0000 + 0.0000i


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50124>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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