Skip to content

Computes nth harmonic number from the digamma function

License

Notifications You must be signed in to change notification settings

howion/nth-harmonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nth-harmonic

Computes nth harmonic number with 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

$ npm install nth-harmonic

Usage

Import

import nthHarmonic from 'nth-harmonic' // ES6 OR TYPESCRIPT

Use

nthHarmonic($n: number): number

License

MIT