An open API service indexing awesome lists of open source software.

https://github.com/kevindmorris/matician

A modern JavaScript utility library for arithmatic, mathematics, proability, statistics, and more.
https://github.com/kevindmorris/matician

javascript tsup typescript

Last synced: 3 months ago
JSON representation

A modern JavaScript utility library for arithmatic, mathematics, proability, statistics, and more.

Awesome Lists containing this project

README

          

**[Matician](https://kevindmorris.github.io/matician/): (/mษ™หˆtiSH(ษ™)n/) Shorthand for a specialist or expert in mathematics.**


A modern JavaScript/TypeScript utility library for arithmetic, algebra, probability, statistics, financial and actuarial math, and more.

[![npm version](https://img.shields.io/npm/v/matician.svg)](https://www.npmjs.com/package/matician)
[![npm downloads](https://img.shields.io/npm/dm/matician.svg)](https://www.npmjs.com/package/matician)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/matician)](https://bundlephobia.com/package/matician)
[![dependencies](https://img.shields.io/librariesio/release/npm/matician)](https://libraries.io/npm/matician)
[![GitHub issues](https://img.shields.io/github/issues/kevindmorris/matician)](https://github.com/kevindmorris/matician/issues)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/kevindmorris/matician)](https://github.com/kevindmorris/matician/pulls)
[![last commit](https://img.shields.io/github/last-commit/kevindmorris/matician)](https://github.com/kevindmorris/matician/commits)
[![maintenance](https://img.shields.io/maintenance/yes/2025)](https://github.com/kevindmorris/matician)
[![TypeScript](https://img.shields.io/badge/TypeScript-checked-blue.svg)](https://www.typescriptlang.org/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io/)
[![license](https://img.shields.io/npm/l/matician)](https://github.com/kevindmorris/matician/blob/main/LICENSE)

## ๐Ÿ”ง Installation

```
npm install matician
```

or with yarn:

```
yarn add matician
```

## โœจ Features

### โž• Basic Arithmetic & Algebraic Operators

Useful helpers for:

- Addition, subtraction, multiplication, division
- Powers, roots, modulo, absolute value
- Other algebraic operations

### ๐Ÿ“Š Statistics

Robust functions for descriptive statistics:

- Mean, median, mode, variance, standard deviation
- Percentiles, range, interquartile range

### ๐Ÿงฎ Combinatorics

Combinatorial calculations:

- Permutations and combinations (with or without replacement)
- Factorials, binomial coefficients, and more

### ๐ŸŽฒ Probability Distributions

Discrete and continuous probability distributions:

- Discrete: Bernoulli, Binomial, Poisson, Geometric, Negative Binomial, Discrete Uniform, and more
- Continuous: Normal, Log-normal, Exponential, Continuous Uniform, and more
- All distributions include PDF/PMF, CDF, mean, variance, and sampling methods

### ๐ŸŽฒ Random Number Generators

Simple random number generators for various use cases:

- Uniform integers and floats
- Gaussian (normal) sampling

### ๐Ÿ’ฐ Financial & Actuarial Math

Annuity functions with support for:

- Present and future values
- Immediate and due annuities

### ๐Ÿงช Tested & Typed

- **100% TypeScript** โ€” fully typed for better editor support and safety
- Exhaustively tested using Jest
- JSDoc for inline IDE documentation

# Run Tests

```bash
git clone https://github.com/kevindmorris/matician.git
npm install
npm test # Run the entire test suite
npm test -- add.test.ts # Run an individual test suite
```

# Contributors

Open an [issue](https://github.com/kevindmorris/matician/issues) to address bugs or suggest new modules!