octave-maintainers
[Top][All Lists]
Advanced

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

Re: About diagonal matrices


From: Søren Hauberg
Subject: Re: About diagonal matrices
Date: Sun, 22 Feb 2009 11:16:10 +0100

son, 22 02 2009 kl. 10:14 +0100, skrev Jaroslav Hajek:
> > Yes, I understand that it is convenient for many uses for diagonal
> > and sparse matrices to have the properties you want.  But I'm also
> > don't like having things like
> >
> >  full_matrix == diag_matrix
> >
> > yet
> >
> >  diag_matrix * scalar != full_matrix * scalar
> >
> > for some values of scalar.
> >
> > jwe
> >
> 
> Why? This behaviour has been around for ages for sparse matrices, and
> nobody complained.
> It's just the distinction between an assumed zero and numerical zero.
> It's *standard* in numerical software.
> It is usually both numerically (or practically) superior and more
> effective, you just need to be aware of it in
> certain cases.

When the diagonal matrix type was introduced I was under the impression
that it would only be an optimization (i.e. my programs would run faster
but produce the same results). The issue raised by John (I think) is
that this change also changes the output of programs. While I think that
the current behaviour in the development sources is actually better then
the 3.0 behaviour, I do foresee problems because of this change. I
realize that only terribly written programs depend on the behaviour of
NaN, but I would claim that 99% of all software ever written is indeed
terrible. So, I'm guessing that we'll hear from people complaining over
this (and that we can't even provide the true Matlab experience).

That being said, I actually favour the current behaviour in the
development sources. I just think we should be prepared for some very
angry complaints from people because we broke their programs.

Soren



reply via email to

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