[Top][All Lists]

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

Re: About diagonal matrices

From: Daniel J Sebald
Subject: Re: About diagonal matrices
Date: Sun, 01 Mar 2009 16:05:05 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Jaroslav Hajek wrote:
On Sun, Feb 22, 2009 at 12:49 AM, Daniel J Sebald

Here's a bug:

octave:18> complex(0,Inf) - Inf
ans = -Inf + Infi
octave:23> complex(0,-Inf) + Inf
ans = Inf - Infi

That should be -Inf + NaNi, I'd think.


Eh, that looks right.  I must have gotten lost in looking at all the Inf 

Same sort of thing here:

octave:28> complex(0,-Inf) / 0
warning: division by zero
ans = NaN - NaNi

should be NaN - Infi.

Not really. The reason is that the zero is converted to complex zero
prior to the division, i.e. there is no actual complex/real operation
implemented in Octave. An implementation using the direct algorithm
would, of course, be superior.

OK, complex(3,4)/complex(0,0) = NaN + NaNi.  I guess it is better as is.  In 
some sense, there shouldn't be a NaN + NaNi, just NaN, otherwise there is all 
kind of implied meaning.  Same with Inf + Infi.  (Just exactly along what path 
does the limit follow?)

Alright, so:

octave:24> complex(3,0) / 0
warning: division by zero
ans = NaN - NaNi
octave:25> 3 / 0
warning: division by zero
ans = Inf

Anyone recall John Travolta when he started out in Welcome Back Kotter?  "I'm so 


reply via email to

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