@numio/bigmath
Version:
@numio/bigmath is an arbitrary-precision arithmetic library. It can be used for basic operations with decimal numbers (integers and float)
15 lines (14 loc) • 467 B
TypeScript
import type { BI2S } from "../shared/types.d.ts";
/** Using this function you can chain operations (add, sub, div, mul). */
export declare class Pipe {
#private;
constructor(value?: string);
add(array: string[]): Pipe;
sub(array: string[]): Pipe;
div(array: string[], precision?: number): Pipe;
mul(array: string[]): Pipe;
abs(): Pipe;
mod(value: string): Pipe;
calc(): ReturnType<BI2S>;
resultToBase(radix: number): string;
}