https://github.com/howion/nth-harmonic
Computes nth harmonic number from the digamma function
https://github.com/howion/nth-harmonic
javascript library math mathematics typescript
Last synced: about 2 months ago
JSON representation
Computes nth harmonic number from the digamma function
- Host: GitHub
- URL: https://github.com/howion/nth-harmonic
- Owner: howion
- License: mit
- Created: 2019-10-08T18:17:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-10-28T04:02:49.000Z (8 months ago)
- Last Synced: 2025-10-28T05:26:13.025Z (8 months ago)
- Topics: javascript, library, math, mathematics, typescript
- Language: TypeScript
- Homepage: https://npmjs.com/package/nth-harmonic
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nth-harmonic
Computes **nth** harmonic number with [**digamma function**](https://en.wikipedia.org/wiki/Digamma_function).

## Why
Because it's much faster then casual summing operation for large values of **`n`** and it's more precise.
## Installation
From [**NPM**](https://www.npmjs.com/package/nth-harmonic)
```bash
npm install nth-harmonic
```
## Usage
```js
import nthHarmonic from 'nth-harmonic' // ES6 OR TYPESCRIPT
```
```js
nthHarmonic($n: number): number
```
## License
[**MIT**](https://github.com/howion/nth-harmonic/blob/master/LICENSE)