|
From: | David Tran |
Subject: | Re: [Bug-apl] Simple division question |
Date: | Thu, 19 May 2016 23:15:53 -0400 |
This is because 2÷m will result in division by zero. You can see that 2÷1+m works fine, since that prevents any zeros in the divisor.Regards,EliasOn 20 May 2016 at 11:07, David Tran <address@hidden> wrote:DaveThanks,but scalar ÷ matrix got no "expected" result and error... why?matrix ÷ scalar is OK too,are all expected result.scalar × matrixmatrix × scalarOne higher rank to matrix,are all expected result. ( as scalar duplicate to same shape as vector )scalar × or ÷ vectorHi,vector × or ÷ scalar
~~~~~~~~
2 × 3 4
6 8
3 4 × 2
6 8
2 ÷ 3 4
0.6666666667 0.5
3 4 ÷ 2
1.5 2
m ← 3 3⍴1,3⍴0
m
1 0 0
0 1 0
0 0 1
m × 2
2 0 0
0 2 0
0 0 2
2 × m
2 0 0
0 2 0
0 0 2
m ÷ 2
0.5 0 0
0 0.5 0
0 0 0.5
2 ÷ m
DOMAIN ERROR
2÷m
^ ^
[Prev in Thread] | Current Thread | [Next in Thread] |