base-log

0.0.2 • Public • Published

base-log

Returns the logarithm of a number (y) with specified base (x). logxY

Install

npm install base-log
bower install base-log

Usage

baseLog(base, number) => logarithm

const baseLog = require('base-log');
 
console.log(baseLog(5, 25)); // 2
console.log(baseLog(7, 49)); // 2
console.log(baseLog(2, 8)); // 3
console.log(baseLog(4, 64)); // 3
console.log(baseLog(2, 16)); // 4

Test

npm test

License

MIT

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i base-log

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Last publish

    Collaborators

    • miguelmota