matician - v2.0.0
    Preparing search index...

    Function logBase

    • Returns the logarithm of a number at a specified base.

      Parameters

      • value: number

        The number to compute the logarithm of.

      • base: number

        The base of the logarithm.

      Returns number

      The logarithm of the number to the specified base.

      Will throw an error if the value or base is not positive or if base is 1.

      logBase(8, 2);    // returns 3
      logBase(100, 10); // returns 2
      logBase(Math.E, Math.E); // returns 1