numsum

Calculate the sum for given numbers.
Version:
  • 1.0.0
Author:
License:
  • MIT
Source:

Members

(inner, constant) mi

mi - Calculates the expected value for a probability distribution.
Since:
  • 1.0.0
Source:
See:

Methods

(static) range(from, to) → {number}

range - Calculates the sum of all numbers in the given range (both inclusive).
Parameters:
Name Type Description
from number The start index.
to number The end index.
Since:
  • 1.0.0
Source:

(static) round(number, precision) → {number}

round - Round a number to a specific number of decimal places.
Parameters:
Name Type Description
number number The number to round.
precision number The mathematical precision.
Since:
  • 1.0.0
Source:

(static) sum(nums) → {number}

sum - Calcualtes the sum of the given numbers. This might be an array or multiple parameters of numbers.
Parameters:
Name Type Description
nums array An array of numbers.
Since:
  • 1.0.0
Source:

(static) variance(dists) → {number}

variance - Calculates the variance for a probability distribution.
Parameters:
Name Type Description
dists array The probability distribution.
Since:
  • 1.0.0
Source:
See:

(inner) flatten(arr) → {array}

flatten - Removes all nested arrays from an array and stores the values from the nested array in the top-level array.
Parameters:
Name Type Description
arr array An array which contains nested arrays.
Since:
  • 1.0.0
Source:
See: