diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-09-07 11:31:07 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-09-07 11:31:07 +0900 |
| commit | 4db9b0d4d646dc903c2c4a94b27112866484c623 (patch) | |
| tree | 4c155b1f376fbc4f1c2ab20ec6b419018569bd8a /problems/14-Matrix-Square | |
| parent | e151eb305498b48668b04d81cbfe799511a2fda5 (diff) | |
| download | mncore-challenge-4db9b0d4d646dc903c2c4a94b27112866484c623.tar.gz mncore-challenge-4db9b0d4d646dc903c2c4a94b27112866484c623.tar.zst mncore-challenge-4db9b0d4d646dc903c2c4a94b27112866484c623.zip | |
14-Matrix-Square: testcase 1 - double 4x4
Diffstat (limited to 'problems/14-Matrix-Square')
| -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 |
