Skip to content

Instantly share code, notes, and snippets.

@o0101
Created February 25, 2021 16:42
Show Gist options
  • Save o0101/df3dee2839e95f1fa04f78860afe0807 to your computer and use it in GitHub Desktop.
Save o0101/df3dee2839e95f1fa04f78860afe0807 to your computer and use it in GitHub Desktop.
function z(n) {
const T = 0.00001
let lastT = 0; let L = Math.log(n);
while(Math.abs(lastT-L) > T) { lastT = L;
L = Math.log(n)/Math.log(L);
}
return L;
}
this is sort of the natural base of any number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment