|
@@ -18,19 +18,25 @@ Eshell V13.2 (abort with ^G)
|
|
|
2> niftest:hello().
|
|
|
"Hello world!"
|
|
|
3> niftest:factorial(5).
|
|
|
-"120"
|
|
|
-4> niftest:factorial(20).
|
|
|
-"2432902008176640000"
|
|
|
-5> niftest:factorial(34).
|
|
|
-"295232799039604140847618609643520000000"
|
|
|
-6> niftest:factorial(35).
|
|
|
+<<"x">>
|
|
|
+4> binary:decode_unsigned(niftest:factorial(5)).
|
|
|
+120
|
|
|
+5> niftest:factorial(20).
|
|
|
+<<33,195,103,124,130,180,0,0>>
|
|
|
+6> binary:decode_unsigned(niftest:factorial(20)).
|
|
|
+2432902008176640000
|
|
|
+7> niftest:factorial(34).
|
|
|
+<<222,27,196,209,158,252,172,130,68,93,167,91,0,0,0,0>>
|
|
|
+8> binary:decode_unsigned(niftest:factorial(34)).
|
|
|
+295232799039604140847618609643520000000
|
|
|
+9> niftest:factorial(35).
|
|
|
{error,"input too large, max is 34"}
|
|
|
-7> niftest:factorial(-5).
|
|
|
+10> niftest:factorial(-5).
|
|
|
** exception error: bad argument
|
|
|
in function niftest:factorial/1
|
|
|
called as niftest:factorial(-5)
|
|
|
-8> q().
|
|
|
-
|
|
|
+11> q().
|
|
|
+ok
|
|
|
|
|
|
|
|
|
|