[Top][All Lists]

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

[Octave-bug-tracker] Re: [bug #31974] Interpreter fails to create comple

From: Jaroslav Hajek
Subject: [Octave-bug-tracker] Re: [bug #31974] Interpreter fails to create complex numbers with Inf complex parts
Date: Mon, 3 Jan 2011 16:30:53 +0100

On Mon, Jan 3, 2011 at 8:02 AM, John W. Eaton <address@hidden> wrote:
> 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.

Why "have to"? Is this a documented behavior in Matlab? When did it
appear? I don't see this making any obvious sense in general. The most
intuitive definition of real*complex is c * complex(a, b) =
complex(c*a, c*b) and that's what Octave uses now. As far as I can
tell, the only place where this is counter-intuitive is in expressions
like a+b*i with a,b constant, because then most users incorrectly
assume they are creating a constant. Or did we have a bug report not
falling into this class?

reply via email to

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