UNPKG

@nexys/math-ts

Version:

[![npm version](https://badge.fury.io/js/%40nexys%2Fmath-ts.svg)](https://www.npmjs.com/package/@nexys/math-ts) [![TavisCI](https://travis-ci.com/Nexysweb/tableau-wdc-react.svg?branch=master)](https://travis-ci.com/github/Nexysweb/math-ts) [![Deployment](

11 lines (10 loc) 529 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mortgageMultiplier = (r, n) => { const d = 1 - Math.pow((1 + r), (-n)); return r / d; }; exports.mortgageRepayment = (p, r, n) => p * exports.mortgageMultiplier(r, n); exports.dueAtN = (p, c, r, n) => p * Math.pow((1 + r), n) - c * (Math.pow((1 + r), n) - 1) / r; exports.interestAtN = (p, c, r, n) => exports.dueAtN(p, c, r, n) * r; exports.cumulativeInterestAtN = (p, c, r, n) => (p * r - c) * (Math.pow((1 + r), n) - 1) / r + c * n;