diff options
| -rw-r--r-- | problems/14-Matrix-Square/answer_1_double_4x4.vsm | 5 | ||||
| -rw-r--r-- | problems/14-Matrix-Square/testcase_1_double_4x4.rb | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/problems/14-Matrix-Square/answer_1_double_4x4.vsm b/problems/14-Matrix-Square/answer_1_double_4x4.vsm index e69de29..94a3569 100644 --- a/problems/14-Matrix-Square/answer_1_double_4x4.vsm +++ b/problems/14-Matrix-Square/answer_1_double_4x4.vsm @@ -0,0 +1,5 @@ +dmwrite $lm0v $ly0 +dmread $ly0 $nowrite; dbfn $lm0v $nowrite +dbfn $mreadf $lr0v; dmwrite $aluf $lx0 +dmmulu $lx $aluf $nowrite +dmfmad $lx $lr0v $mauf $ln0v diff --git a/problems/14-Matrix-Square/testcase_1_double_4x4.rb b/problems/14-Matrix-Square/testcase_1_double_4x4.rb new file mode 100644 index 0000000..106e48a --- /dev/null +++ b/problems/14-Matrix-Square/testcase_1_double_4x4.rb @@ -0,0 +1,10 @@ +require 'matrix' + +a = Matrix[ + [3.0, 9.0, 7.0, 5.0], + [1.0, 1.0, 0.0, 8.0], + [6.0, 7.0, 0.0, 9.0], + [8.0, 2.0, 1.0, 1.0], +] + +puts a**2 |
