UNPKG

decimal128

Version:

Partial implementation of IEEE 754 Decimal128 decimal floating-point numbers

12 lines (9 loc) 241 B
import { Decimal128 } from "../src/Decimal128.mjs"; function pow(a: Decimal128, b: number): Decimal128 { let result = a; for (let i = 0; i < b; i++) { result = result.multiply(a); } return result; } export { pow };