Wondering what’s next for npm?Check out our public roadmap! »

    @bemoje/math-log10-approx

    1.1.1 • Public • Published

    @bemoje/math-log10-approx

    Approximate the logarithm base 10 of a small integer.

    Version

    NPM version

    Travis CI

    dependencies

    Dependencies

    dependencies

    Stats

    NPM downloads Forks

    Donate

    Buy Me A Beer donate button PayPal donate button

    Installation

    npm install @bemoje/math-log10-approx
    npm install --save @bemoje/math-log10-approx
    npm install --save-dev @bemoje/math-log10-approx

    Usage

    import mathLog10Approx from '@bemoje/math-log10-approx'
     
    //=> undefined
    log10(0)
    //=> 0
     
    log10(1)
    //=> 0
     
    log10(5)
    //=> 0
     
    log10(10)
    //=> 1
     
    log10(100)
    //=> 2
     
    log10(1000)
    //=> 3
     
    log10(10000)
    //=> 4
     
    log10(105000)
    //=> 5
     
    log10(1000200)
    //=> 6
     
    log10(10000010)
    //=> 7
     
    log10(100051000)
    //=> 8
     
    log10(1005100000)
    //=> 9
     
    log10(10055100727920584576600)
    //=> 9
     
    log10(100551007279206235576600)
    //=> 9
     

    Tests

    Uses Jest to test module functionality. Run tests to get coverage details.

    npm run test

    API

    r

    Install

    npm i @bemoje/math-log10-approx

    DownloadsWeekly Downloads

    13

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    8.33 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar