Returns the summation of a sequence.

// Returns almost π²/6
const sum = Chalkboard.numb.sum("1 / (n * n)", 0, 1000);
  • Parameters

    • formula: string

      Sequence written in summation notation with the variable "n"

    • inf: number

      Lower bound

    • sup: number

      Upper bound

    Returns number