-
Notifications
You must be signed in to change notification settings - Fork 0
log
Subhajit Sahu edited this page Aug 9, 2022
·
2 revisions
Find the logarithm of a number with a given base.
function log(x, b)
// x: a number
// b: logarithm base [e]
const xnumber = require('extra-number');
xnumber.log(Math.E);
// → 1
xnumber.log(10);
// → 2.302585092994046
xnumber.log(243, 3);
// → 5
xnumber.log(64, 2);
// → 6