[Scilab-users] Is cond([]) 0 or 1 ? (bug 15579)
Samuel Gougeon
sgougeon at free.fr
Mon May 21 15:46:21 CEST 2018
Hello,
Another case with []:
The bug 15579 <http://bugzilla.scilab.org/show_bug.cgi?id=15579> reports
that *cond([])* returns *1*, while *cond([],2)* -- that computes the
same 2-norm conditional number for any other matrix than [] -- returns *0*.
Actually, *cond([], p)* returns 0 for any accepted p value.
At least since Scilab 4, and likely since the beginning of Scilab,
*cond([])* is set to 1 as a specific case.
I am wondering why.
In my opinion, the mismatch between *cond([])* and the equivalent
*cond([],2)* must be fixed.
There are at least two way to do it :
* either keep *cond([])* to *1* and set all *cond([], p)* to 1 instead
of 0
* or set *cond([])* to *0*.
I don't see any clear reason enforcing a choice rather than the other.
Do you?
Let's note that
* Octave returns 0 in both cond([]) and cond([],p) cases
* Julia, Python, and R (with kappa()) yield an error
Regards
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180521/3de4e049/attachment.htm>
More information about the users
mailing list