Simplify sqr(x) to x*x

This commit is contained in:
Garth Minette
2020-09-28 16:52:17 -07:00
parent 8ce63f83c6
commit 37ae0cbba0
3 changed files with 6 additions and 8 deletions

View File

@@ -313,7 +313,7 @@ module test_sqr() {
assert_equal(sqr(2.5), 6.25);
assert_equal(sqr(3), 9);
assert_equal(sqr(16), 256);
assert_equal(sqr([2,3,4]), [4,9,16]);
assert_equal(sqr([2,3,4]), 29);
assert_equal(sqr([[2,3,4],[3,5,7],[3,5,1]]), [[25,41,33],[42,69,54],[24,39,48]]);
}
test_sqr();