Decimal-safe math for JavaScript/TypeScript - accurate arithmetic (add, sub, mul, div, round) without floating-point errors. Plus factorial, prime numbers, fibonacci, GCD, LCM, number conversions, perfect numbers, Armstrong numbers, and more. Perfect for
npm install @upendra.manike/precise-mathDecimal-safe math for JavaScript without floating-point surprises. Accurate add, sub, mul, div, and round.
``bash`
npm i @upendra.manike/precise-math
`ts
import { add, sub, mul, div, round } from '@upendra.manike/precise-math';
add(0.1, 0.2); // 0.3
sub('1.00', '0.7'); // 0.3
mul(1.5, 3); // 4.5
round(0.105, 2); // 0.11
``