Function log

  • Returns the logarithm of a number (can be in Bangla or English digits).

    Parameters

    • a: string | number

      Number (Bangla or English digits).

    • en: boolean = false

      If true, returns the result in English digits. Default is false (returns Bangla digits).

    Returns string

    The natural logarithm of a (rounded to 12 decimal places).

    log("১০"); // returns "১"
    log(10, true); // returns "1"
    log("১০০", true); // returns "2"
    log("২.৭১৮"); // returns "১"

    If the input is invalid or not a number.