Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code reviewanswer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 isnt available in matlab as a builtin , thus I replaced log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 isnt available in matlab as a builtin , thus I replaced log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 isnt available in matlab as a builtin , thus I replaced log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

added 8 characters in body
Source Link
Abr001am
  • 930
  • 7
  • 17

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 builtinlog5 isnt available in matlab as a builtin , thus i replacesI replaced log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 builtin isnt available in matlab, thus i replaces log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 isnt available in matlab as a builtin , thus I replaced log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

added 45 characters in body
Source Link
Abr001am
  • 930
  • 7
  • 17

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 builtin isnt available in matlab, thus i replaces log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 builtin isnt available in matlab, thus i replaces log(5) by 1.6, doesnt matter because it will be anyways floored.

Matlab (59) (54)(39)

Hey dawg !!!! we heard you like maths ....

  @(n)sum(fix(n./5.^(1:fix(log(n)/1.6))))
  • This is based on my created answer in code review.

  • further than what is mentioned in my answer in code review, the formula for number of zeros in factorial(n) is Sum(n/(5^k)) where k varies between 1 and log_5(n)

  • The only trivial reason why it cant get golfier is that log5 builtin isnt available in matlab, thus i replaces log(5) by 1.6, doesnt matter because it will be anyways floored.

Give it a try

Rollback to Revision 4
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading
Rollback to Revision 3
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading
added 172 characters in body
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading
added 19 characters in body
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading
added 184 characters in body
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading
Source Link
Abr001am
  • 930
  • 7
  • 17
Loading