diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-09-07 12:01:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-09-07 12:01:16 +0900 |
| commit | c14731c45f0a263936bf2ca4a09940cfd4c670b5 (patch) | |
| tree | a57c707d31b41df03b0b82e9ff1fa4532f1c5aad | |
| parent | 4db9b0d4d646dc903c2c4a94b27112866484c623 (diff) | |
| download | mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.tar.gz mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.tar.zst mncore-challenge-c14731c45f0a263936bf2ca4a09940cfd4c670b5.zip | |
14-Matrix-Square: testcase 2 - float 8x8
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | problems/14-Matrix-Square/answer_2_float_8x8.vsm | 7 | ||||
| -rw-r--r-- | problems/14-Matrix-Square/testcase_2_float_8x8.rb | 14 |
3 files changed, 22 insertions, 1 deletions
@@ -1,4 +1,4 @@ -all: matrix_square_testcase_1 +all: matrix_square_testcase_2 matrix_square_testcase_1: ./judge problems/14-Matrix-Square/testcase_1_double_4x4.vsm problems/14-Matrix-Square/answer_1_double_4x4.vsm diff --git a/problems/14-Matrix-Square/answer_2_float_8x8.vsm b/problems/14-Matrix-Square/answer_2_float_8x8.vsm index e69de29..b27313b 100644 --- a/problems/14-Matrix-Square/answer_2_float_8x8.vsm +++ b/problems/14-Matrix-Square/answer_2_float_8x8.vsm @@ -0,0 +1,7 @@ +gmwrite $lm0v $ly0; gbfn $lm0v $lr128v +gmwrite $lm8v $ly4; gbfn $lm8v $lr136v +gmread $ly0 $lr0v; gmwrite $lr128v $lx0 +gbfn $mreadf $lr0v; gmread $ly4 $ls0v; gmwrite $lr136v $lx4 +gbfn $mreadf $ls0v +gmmul $lx $lr0v $ln0v +gmmul $lx $ls0v $ln8v diff --git a/problems/14-Matrix-Square/testcase_2_float_8x8.rb b/problems/14-Matrix-Square/testcase_2_float_8x8.rb new file mode 100644 index 0000000..b252979 --- /dev/null +++ b/problems/14-Matrix-Square/testcase_2_float_8x8.rb @@ -0,0 +1,14 @@ +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], + [3.0, 5.0, 4.0, 2.0, 6.0, 1.0, 2.0, 3.0], + [4.0, 7.0, 1.0, 5.0, 5.0, 0.0, 6.0, 1.0], + [0.0, 9.0, 9.0, 8.0, 3.0, 0.0, 6.0, 4.0], + [1.0, 4.0, 0.0, 9.0, 2.0, 6.0, 3.0, 5.0], + [5.0, 1.0, 9.0, 7.0, 9.0, 8.0, 5.0, 9.0], + [0.0, 1.0, 0.0, 3.0, 3.0, 2.0, 8.0, 3.0], +] + +puts a**2 |
