Fri 23 Mar 2012 07:53:11 AM UTC, comment #3:
Thanks for the patch, it works.
However, the expression 'diag ([1,2,3], 6, 3)' that is used as testcase in the commit works perfectly (on my systems) with unpatched Octaves. I suggest 'diag([0],6,3)' or 'diag ([0], 6, 6)' testcase. On my milage it is important that the first argument is scalar.
|
Thu 22 Mar 2012 02:23:10 PM UTC, original submission:
Example:
User input:
> diag([0],6,3)
Actual result:
0.0000e+00 5.5502e-268 5.5520e-268
5.5442e-268 5.5505e-268 5.5523e-268
5.5425e-268 5.5508e-268 5.5526e-268
5.5444e-268 5.5511e-268 5.5529e-268
5.5428e-268 5.5514e-268 5.5532e-268
5.5499e-268 5.5517e-268 3.6144e-313
Expected: zero 6x3 matrix
This behaviour seems to be version/build/system dependent. Sometimes the result varies with time.
To reproduce, please also try varying b and c, like that: diag(3,3,3), diag(4,4,4), diag(6,6,6), diag(9,9,9).
Tested on Octave 3.6.0 @x86 Intel Core2 Quad and Octave 3.4.3 @x86_64 Intel Xeon.
|