0

hi
can you tell me what type of data i should use to store a very large number like 500! (factorial of 500)

thanks

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by alaa sam
0

Something like http://www.mpir.org/ (or http://gmplib.org/ if you're on *nix). Check the documentation for the largest number allowed, as 500! may far exceed it. Remember that 500! is a monstrous number! Check to make sure your assignment isn't to approximate it somehow.

Edited by jonsca: n/a

0

If you do not go towards the better solution of using the above links, then what you want is to use an array. Work by digit by digit.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.