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

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

[Octave-bug-tracker] [bug #37297] Meaningless test in fftfilt.m, patch t


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #37297] Meaningless test in fftfilt.m, patch to address this issue as well enhance final touchup of routine and fix rounding bug
Date: Wed, 12 Sep 2012 02:08:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24

Follow-up Comment #2, bug #37297 (project octave):

Here is a revamped version of the patch that is likely more robust using the
all(imag(x(:,i))==0) construct rather than isreal().

In the case of strictly imaginary numbers (which are stored as complex) I've
chosen to maintain the signs of the real component when set to zero, i.e.:

    y (:,xisimag) = complex (real (y (:,xisimag)) * 0, imag (y (:,xisimag)));

because that is more consistent with current behavior generally in Octave.  If
it is desired that -0 should not be used in the real field, then one could
do:

    y (:,xisimag) = complex (0, imag (y (:,xisimag)));

which probably requires a bit less CPU.  However, there may be some final
tweak for this patch yet to address that.  So hold off until a couple weeks
after this date in case the handling of -0 is changed in Octave.

(file #26537)
    _______________________________________________________

Additional Item Attachment:

File name: octave-fftfilt-2012sep11.patch Size:3 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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