Ported test cases for class Integer
[ACL.git] / test / integer_factorial.exp
diff --git a/test/integer_factorial.exp b/test/integer_factorial.exp
new file mode 100644 (file)
index 0000000..fad52da
--- /dev/null
@@ -0,0 +1,24 @@
+one = 1
+one + 1 = 2
+two = 2
+fact30 = factorial(30) = 265252859812191058636308480000000
+fact28 = factorial(28) = 304888344611713860501504000000
+fact30 + fact28 = 265557748156802772496809984000000
+fact30 - fact28 = 264947971467579344775806976000000
+fact30 * fact28 = 80872505331661933764010628483512781121876047953920000000000000
+fact30 / fact28 = 870
+fact30 % fact28 = 0
+-fact30 = -265252859812191058636308480000000
+lg(fact30) = 107
+gcd(fact30, fact28) = 304888344611713860501504000000
+sqrt(fact30) = 16286585271694955
+negfact31 = -8222838654177922817725562880000000
+fact30 + negfact31 = -7957585794365731759089254400000000
+fact30 - negfact31 = 8488091513990113876361871360000000
+fact30 * negfact31 = -2181131468794922353615366650200339706856997013317222400000000000000
+fact30 / negfact31 = 0
+fact30 % negfact31 = 265252859812191058636308480000000
+gcd(fact30, negfact31) = 265252859812191058636308480000000
+
+End of test
+PASS integer_factorial (exit status: 0)