bugGNU Octave - Bugs: bug #49900, cplxpair return error message...

 
 

bug #49900: cplxpair return error message where data seems good

Submitter:  Henk Borsje <hjborsje>
Submitted:  Wed 21 Dec 2016 12:23:41 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Henk Borsje Open/Closed:  * Closed
Release:  * 4.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 14 Sep 2017 04:19:34 PM UTC, comment #3: 

Henk - if you think there is still a bug in cplxpair, please file a new bug report with a detailed description.

With the example you posted here (or how I understand it)


>> z = -1.0000 + 1.2246e-16;
>> tol = 2.2204e-10;
>> cplxpair (z, tol)
ans = -1.00000


I get no error, seems to be working fine.

Mike Miller <mtmiller>
Group Member
Thu 14 Sep 2017 03:59:48 PM UTC, comment #2: 

It looks like there still is a problem with cplxpair().  It seems unrelated to units of tolerance, as someone suggested, it is a different bug.

When the function is entered with:

z = -1.0000 + 1.2246e-16

tol = 2.2204e-10

the same error still appears in the following section of code:

  ## For each remaining z, place the value and its conjugate at the start of
  ## the returned list, and remove them from further consideration.
 
  for j = 1:m
    p = n - nr(j);
    for i = 1:2:p
      if (i+1 &gt; p)
        error (&quot;cplxpair: could not pair all complex numbers&quot;);
      endif



'nr' seems to be an empty sparse matrix and 'p' gets the value of 1 and always has a value less than 'i+1'

The input arguments come from a call to 'butter' and are not made up.

Thank you for your attention.

Henk Borsje

Henk Borsje <hjborsje>
Wed 21 Dec 2016 06:02:12 PM UTC, comment #1: 

Thanks for reporting this bug. This is a duplicate of bug #47865, which is not yet fixed. Please continue with any comments or contributions on that report.

Mike Miller <mtmiller>
Group Member
Wed 21 Dec 2016 12:23:41 PM UTC, original submission:  

With the following input arguments ML version of cplxpair returns valid answers, Octave reports error

x =

 -0.309016994374947 + 0.951056516295154i
 -0.809016994374947 + 0.587785252292473i
 -1.000000000000000 + 0.000000000000000i
 -0.809016994374947 - 0.587785252292473i
 -0.309016994374948 - 0.951056516295154i

tol =

     2.482534375291878e-09

Octave returns error in following lines:

      if (v > tol*eps (abs (z(i))))
        error ("cplxpair: could not pair all complex numbers");
      endif

ML returns:

 -0.809016994374947 - 0.587785252292473i
 -0.809016994374947 + 0.587785252292473i
 -0.309016994374947 - 0.951056516295154i
 -0.309016994374947 + 0.951056516295154i
 -1.000000000000000                    





Henk Borsje <hjborsje>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by hjborsje (Submitted the item)
  • -email is unavailable- added by hjborsje (cmplpair)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller Carbon-CopyRemoved 80942 -
    2016-12-21 mtmiller StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #47865
    2016-12-21 hjborsje Carbon-Copy- Added hjborsje

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code