UNPKG

node-irr-es5

Version:

A Node.js package that provides an easy and customizable way to calculate internal rate of return.

22 lines (21 loc) 606 B
import { Polynomial } from '../polynomial'; export declare enum RootFinderMethod { Bisection = "bisection", Newton = "newton" } export declare type RootFinderOptions = { epsilon?: number; estimate?: number | 'auto'; fallbackMethod?: RootFinderMethod | null; maxIterations?: number; method?: RootFinderMethod; }; export declare type Root = { converged: boolean; iterations: number; value: number; }; export interface IRootFinder { findRoot(polynomial: Polynomial): Root; } export declare const DEFAULT_ROOT_FINDER_OPTIONS: RootFinderOptions;