Skip to content

Instantly share code, notes, and snippets.

@e-mihaylin
Created October 4, 2018 10:11
Show Gist options
  • Save e-mihaylin/b3cdbdfbac8b88497f3e75d8f7f19271 to your computer and use it in GitHub Desktop.
Save e-mihaylin/b3cdbdfbac8b88497f3e75d8f7f19271 to your computer and use it in GitHub Desktop.
const count = n => Math.floor((ln(2 * Math.PI * n) / 2 + n * (ln(n) - 1)) / ln(10)) + 1;
const ln = x => Math.log(x) / Math.log(Math.E);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment