Skip to content

Instantly share code, notes, and snippets.

@oliverbooth
Created December 10, 2016 20:42
Show Gist options
  • Select an option

  • Save oliverbooth/4d7c61479d0dfd22c6f0cec717b5229d to your computer and use it in GitHub Desktop.

Select an option

Save oliverbooth/4d7c61479d0dfd22c6f0cec717b5229d to your computer and use it in GitHub Desktop.
This seems to work...
/*
* return the number of zeros immediately proceeding the decimal point for any
* (-1 < n < 1)
*/
floor(abs(log10(abs(n))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment