Function log

  • Compute the logarithm of a number to a specified base.

    Parameters

    • n: number

      The number. (n>0)

    • b: number

      The base. (b>0 and b≠1)

    Returns number | undefined

    Returns the logarithm of n to base b.

    Since

    0.5.0

    Example

    log(8, 2)
    // => 3
    log(8, 0)
    // => undefined