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

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

[Octave-bug-tracker] [bug #31974] Interpreter fails to create complex nu


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #31974] Interpreter fails to create complex numbers with Inf complex parts
Date: Mon, 03 Jan 2011 07:02:17 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101028 Iceweasel/3.5.15 (like Firefox/3.5.15)

Follow-up Comment #18, bug #31974 (project octave):

What does Matlab do for


function f (x, y)
  x * y
  x / y
end

f (Inf, i)


If it produces 0+Infi and 0-Infi, then this is not limited to constant
folding, so we have to implement the special case in the operators that might
be affected.  I would guess this includes *, .*, /, ./, , and . for mixed real
and complex cases for scalar by scalar and scalar by array operations for both
double and single values.  Or, we can use a class derived from std::complex
that implements the special cases we want.  Using a derived class like this
would probably require fewer changes to Octave since we already have Complex
and FloatComplex typedefs, but then it would mean that anywhere the class is
used, we get the special behavior, and I'm not sure that's really what we
want.

In any case, I think this change should wait until after 3.4 is released.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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