Skip to content

damianc/math-logn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

math-logn

Calculates the n-base logarithm of a number.

JavaScript provides methods to calculate the natural, base-2 and base-10 logarithm, i.e., Math.log(), Math.log2() and Math.log10() respectively.
... and that's it! With this method you can calculate an n-base logarithm.

Math.logn(x,n) - $\log_n x$

const four = Math.logn(81,3);
// the base-3 logarithm of 81

console.log(four);
// 4

About

Calculates the n-base logarithm of a number.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published