|
||
Title: 100! Post by sat90 on Aug 14th, 2011, 12:05pm whats the logic behind calculating 100!......w/o using any bigint lib |
||
Title: Re: 100! Post by SMQ on Aug 15th, 2011, 9:19am Since 100! has 158 (decimal) digits, you're going to be hard-pressed to calculate the exact result without an arbitrary-precision math library of some sort. However you can, for instance, count the number of zeros at the end w/o a bigint library. --SMQ |
||
Title: Re: 100! Post by towr on Aug 15th, 2011, 1:14pm It's not that hard to implement the method of multiplication you learned in school. Although it's not very efficient, it'll get the job done. |
||
Title: Re: 100! Post by Grimbal on Aug 22nd, 2011, 5:07am Or you can apply the method you learned at school. With a pencil, paper and lots of time. 100! should still be feasible. |
||
Title: Re: 100! Post by towr on Aug 22nd, 2011, 8:43am It's easy to make mistakes by hand, though. |
||
Title: Re: 100! Post by sat90 on Sep 5th, 2011, 6:10am i m not able to simulate manual multiplication using algorithm...plz help!! |
||
Title: Re: 100! Post by towr on Sep 5th, 2011, 8:49am Something like: Pseudo Code:
|
||
Powered by YaBB 1 Gold - SP 1.4! Forum software copyright © 2000-2004 Yet another Bulletin Board |