[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53897] poly of conjugate complex pairs should
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53897] poly of conjugate complex pairs should return a real polynomial |
Date: |
Wed, 6 Mar 2019 13:48:47 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Update of bug #53897 (project octave):
Status: Patch Reviewed => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #17:
I checked in the patch here
(https://hg.savannah.gnu.org/hgweb/octave/rev/a018fca707ca).
I made a few small modifications. In place of tmp1, tmp2, and tmp I used what
I hope are more meaningful variable names pos_imag, neg_imag, and is_equal.
In place of using all() and size() together I just used the C++ function
size_equal().
- if (all (size (tmp1) == size (tmp2)))
+ if (size_equal (pos_imag, neg_imag))
For the BIST test, I used commas to clearly delineate where each number stops
which can sometimes be ambiguous. Is "-9 - 3i" a single complex number or is
it two numbers, "-9+0i AND 0-3i".
-%! assert (y, [1 + 0i -9 - 3i 25 + 24i -17 - 57i -12 + 36i])
+%! assert (y, [1 + 0i, -9 - 3i, 25 + 24i, -17 - 57i, -12 + 36i]);
Thanks Marco for coming up with a high-performance patch (no isequal call).
This will be a part of the bug fix release 5.2.0 in a few months.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?53897>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/