npm.nicfv.com

    Function lim

    • Take the limit of a function. A return value of NaN indicates that no limit exists either due to a discontinuity or imaginary value.

      Parameters

      • f: (x: number) => number

        Function f(x)

      • x: number

        The x-value where to take the limit

      • h: number = 1e-3

        The approach distance

      • discontinuity_cutoff: number = 1

        The discontinuity cutoff

      Returns number

      lim(f(x->x))

      const y = SMath.lim(Math.log, 0); // -Infinity
      
    MMNEPVFCICPMFPCPTTAAATR