Anonymous user
Factorial: Difference between revisions
→{{header|Jsish}} prune the error reporting in the unit test
(Add Jsish) |
|||
Line 3,378:
/* iterative */
function factorial(n:number) {
if (n < 0) throw format("factorial undefined for negative values: %d", n);
var fac = 1;
Line 3,391:
;factorial(18);
;factorial(42);
}</lang>
Line 3,400:
factorial(18) ==> 6402373705728000
factorial(42) ==> 1.40500611775288e+51
=={{header|Julia}}==
|