rStats.js v1.3.0
    Preparing search index...

    Function uniroot

    • A root of a function of one variable in an interval, by Brent's zeroin. Equivalent to R's uniroot().

      Parameters

      • f: (x: number) => number
      • lower: number
      • upper: number
      • options: UnirootOptions = {}

      Returns UnirootResult

      uniroot((x) => x * x - 2, 0, 2, { tol: 1e-12 }).root; // 1.4142135623731364