Is it possible to find the factorial of 10000 in java? -
is possible find factorial of 10000 in java? has done program find factorial of 1000 using biginteger when tried find factorial of 10000 not getting output.
class factorial{ public static void main(string[] args) { factorial fact= new factorial(); fact= getfactorialof(10000); } void getfactorialof(long n) { biginteger result = biginteger.one; (int = 2; <= n; i++) result = result.multiply(biginteger.valueof(i)); system.out.println(result); }
this complete code.
yes possible. according http://gimbo.org.uk/texts/ten_thousand_factorial.txt, 10000 factorial has 35,659 decimal digits ... within capabilities of biginteger
.
which suggests problem either have bug in code, or being impatient.
Comments
Post a Comment