POV-Ray : Newsgroups : povray.off-topic : Some math problems : Re: Some math problems Server Time
5 Sep 2024 03:20:48 EDT (-0400)
  Re: Some math problems  
From: andrel
Date: 22 Sep 2009 15:33:41
Message: <4AB92693.7000807@hotmail.com>
On 22-9-2009 21:20, andrel wrote:

>>   4) By their nature, factorials tend to accumulate trailing zeroes. For
>> example, 5! (120) has one trailing zero, 10! (3628800) has two trailing
>> zeroes, 25! (15511210043330985984000000) has six trailing zeroes, etc.
>>
>>   Give a (non-recursive) mathematical function which, for an integer n,
>> gives the number of trailing zeroes in n!.
> 
> just count the number of 5s, 25s, 125s etc

BTW I did write a quick and dirty arbitrary precision integer thing to 
compute some factorials. I saw the answer before actually having to use 
it, but here is 100!: 
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000
in case you wanted to know.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.