100! Trailing Zeroes

Interesting logic presented, available from these links:

Computing by Excel yielded much more zeroes than above logic though.
I was relieved to see Excel result was similar to that produced by scientific calculator.
Unfortunately, utilizing Excel FACT() function produced inconsistent result.
Even with inconsistency, Excel computation, scientific calculator and Excel FACT() function all came up with similar trailing number of zeroes.

My guess is that the first logic failed to incorporate the exponential factor of the computations, considering only linear calculations.  As for the inconsistency with the Excel FACT() function, I’m not sure if it has to do with 32/64 bit calculations, neither would I consider rounding off since we’re dealing with integers.  For correct answer, there’s no better way than the good old school way of calculation: by hand.

Anyway, for the Excel file, here’s some stuff on it:

  • Converting number to text
  • Finding the length of the text
  • Using the "IF" statement
  • Searching for the position of numbers before 0
  • Using the "Conditional Formatting" to color code "true/false"

Excel file available from this link:

All in all, it’s really not rocket science but sure do needs lot of patience to come up with scientific mathematical logic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s