> I believe the (1+1i)/0 issue is the fault of my c++ complex class implementation
> and not in octave at all. However, the sparse issue is different. The problem here
> is there is no sparse scalar class (it doesn't make sense), and so the standard
> matrix "/" operator is used. So I'm get the answer back from CXSparse's QR
> solver. To get this right will need care to be taken in the "" and "/" operator that
> the size of the sparse matrix passed isn't in fact a scalar, and if it is to convert to
> scalar before the operators. However if we do that, then something like
> "speye(5)*sparse(2)" should also be valid and in fact is in matlab. This is a bit of
> a mess and easier would be to have "sparse(2)" return a scalar rather than a
> sparse matrix, though that will break other things.I'll make a possible patch for
> consideration, but there are lots of files to touch to get this right.
Note that I talked about element-wise division "./" and not "/", so it does not
involves QR. On my system:
(1+i)/0 => Inf + Infi
So, my complex class (or whatever else) seems OK. However, this does not
work in the context of sparse matrix, while it works OK for full matrices. For
instance: