# simple-mathematic

> Simple & efficient implementation of common mathematic functions unavailable in Math module

Latest version **0.2.1** (published 2025-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install simple-mathematic
pnpm add simple-mathematic
yarn add simple-mathematic
bun add simple-mathematic
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2025-02-12 |
| First published | 2023-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cfmano |
| Maintainers | cfmano |
| Keywords | mathematics, math, javascript |

## Links

- npm: https://www.npmjs.com/package/simple-mathematic
- Repository: https://github.com/cfmano/simple-mathematic
- Homepage: https://cfmano.github.io/simple-mathematic/
- Issues: https://github.com/cfmano/simple-mathematic/issues
- npm.io page: https://npm.io/package/simple-mathematic

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2025-02-12
- 0.2.0 — 2025-02-12
- 0.1.1 — 2023-05-21
- 0.1.0 — 2023-04-24
- 0.1.0-actions-test — 2023-04-24
- 0.0.2 — 2023-04-21
- 0.0.1 — 2023-04-18

## README

# Simple Mathematic library

This library consists of common mathematic functions unavailable in Math module. Main focus is on simplicity & efficient implementation.

## List of available functions:

- [Sum](https://cfmano.github.io/simple-mathematic/functions/sum.html)
- [Product](https://cfmano.github.io/simple-mathematic/functions/product.html)
- Parity check
  - [Even](https://cfmano.github.io/simple-mathematic/functions/isEven.html)
  - [Odd](https://cfmano.github.io/simple-mathematic/functions/isOdd.html)
- [Triangle number](https://cfmano.github.io/simple-mathematic/functions/sum.html)
- [Factorial](https://cfmano.github.io/simple-mathematic/functions/factorial.html)
- Geometry
  - Area calculations
    - [Circle area](https://cfmano.github.io/simple-mathematic/functions/circleArea.html)
    - [Ellipse area](https://cfmano.github.io/simple-mathematic/functions/ellipseArea.html)
  - Angle value conversions
    - [Degrees to radians conversion](https://cfmano.github.io/simple-mathematic/functions/degreesToRadians.html)
    - [Radians to degrees conversion](https://cfmano.github.io/simple-mathematic/functions/radiansToDegrees.html)

## Usage

`simple-mathematic` package can be used in both NodeJs and in browser.

Installing `simple-mathematic` as [npm package](https://www.npmjs.com/package/simple-mathematic):

```bash
npm install simple-mathematic
```

The aim of the package is to use functions in the same manner as we would do with native built-in JavaScript's Math module:

```js
import { sum, isOdd, isEven } from 'simple-mathematic';

sum(1,2,3,4,5); // 15
isOdd(123);     // true
isEven(123);    // false
```

To see the full documentation of usage of functions, plese refer to the [list of functions section](https://cfmano.github.io/simple-mathematic/modules.html) and refer to specific function

---
_Source: https://npm.io/package/simple-mathematic · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
