aboutsummaryrefslogtreecommitdiffhomepage
path: root/problems/14-Matrix-Square/testcase_2_float_8x8.rb
diff options
context:
space:
mode:
Diffstat (limited to 'problems/14-Matrix-Square/testcase_2_float_8x8.rb')
-rw-r--r--problems/14-Matrix-Square/testcase_2_float_8x8.rb14
1 files changed, 14 insertions, 0 deletions
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