Matrix multiplication: Difference between revisions
Content added Content deleted
(→{{header|APL}}: use ⌹ instead of explicitly building matrix inverse.) |
|||
Line 560: | Line 560: | ||
The result is: |
The result is: |
||
{{9, 12, 15}, {19, 26, 33}, {29, 40, 51}, {39, 54, 69}} |
{{9, 12, 15}, {19, 26, 33}, {29, 40, 51}, {39, 54, 69}} |
||
=={{header|Nial}}== |
|||
|A := 4 4 reshape 1 1 1 1 2 4 8 16 3 9 27 81 4 16 64 256 |
|||
=1 1 1 1 |
|||
=2 4 8 16 |
|||
=3 9 27 81 |
|||
=4 16 64 256 |
|||
|B := inverse A |
|||
|A innerproduct B |
|||
=1. 0. 8.3e-17 -2.9e-16 |
|||
=1.3e-15 1. -4.4e-16 -3.3e-16 |
|||
=0. 0. 1. 4.4e-16 |
|||
=0. 0. 0. 1. |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |