last five non zero digit of 10^12!



hello everybody , i am trying to solve a problem in which i have to
find last five non zero digits of very large number (upto
1,000,000,000,000) . plz help . one link i found on google groups
(http://groups.google.co.in/group/alt.math.recreational/browse_thread/
thread/b3e9f4fb09446ac/230aa5b8bbd3ad75?hl=en&lnk=st&q=last+non+zero
+digit+of+factorial&rnum=1#230aa5b8bbd3ad75)
is very helpful but this algorithm only gives last non zero digit .
can this algorithm applied for any digit of factorial. other problem
is that my numbers are very big so calculating A[1],A[2],A[3],A[4]
upto 10^12 will take lot of time as according to given method in post
so is there any direct way to calculate A{1],A[2],A[3],A[4].for
example 20! = 2432902008176640000 so last five non zero digit will be
17664

.



Relevant Pages

  • Re: last five non zero digit of 10^12!
    ... find last five non zero digits of very large number (upto ... is very helpful but this algorithm only gives last non zero digit. ... 100000, but get rid of trailing zeros as you go, by first dividing out ... you won't even need any kind of double precision integer ...
    (sci.math)
  • Re: last five non zero digit of 10^12!
    ... On Sep 27, 9:55 pm, mukesh tiwari ... find last five non zero digits of very large number (upto ... is very helpful but this algorithm only gives last non zero digit. ... you divide by 5, and then that many times find a number divisible by 2 ...
    (sci.math)