Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

extra-math

1.1.1 • Public • Published

Mathematics is the classification and study of all possible patterns. 🏃 📼 📦 🌔 📒

Methods as separate packages:

This package includes some common statistics functions. (1)

Stability: Experimental.

const math = require('extra-math');
 
math.sum(1, 2, 3, 4);
// 10
 
math.median(1, 7, 8);
// 7
 
math.variance(1, 2, 3, 4);
// 1.25
 
math.lcm(2, 3, 4);
// 12

reference

Method Action
sum Gives sum of numbers (Σ).
product Gives product of numbers (∏).
mean Gives average of numbers.
median Gives the value separating the higher and lower halves of numbers.
modes Gives the values that appear most often.
range Gives the difference between the largest and smallest values.
variance Gives the mean of squared deviation of numbers from its mean.
erf Gives error function value of number (approximation).
erfc Gives complementary error function value of number (approximation).
rem Gets remainder of x/y with sign of x (truncated division).
mod Gets remainder of x/y with sign of y (floored division).
modp Gets remainder of x/y with +ve sign (euclidean division).
gcd Gives greatest common divisor of numbers.
lcm Gives least common multiple of numbers.
binomial Gives ways to choose k elements from a set of n elements.
multinomial Gives ways to put n objects in m bins (n=sum(ki)).

nodef

Install

npm i extra-math

DownloadsWeekly Downloads

169

Version

1.1.1

License

MIT

Unpacked Size

16.9 kB

Total Files

6

Last publish

Collaborators

  • avatar