-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreciso.d.ts
67 lines (63 loc) · 2.76 KB
/
preciso.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
export function absolute(n: string): string;
export function add(a: string, b: string, options?: { infinity_minus_infinity?: string }): string;
export function binomial_coefficient(n: string, k: string): string;
export function ceil(n: string): string;
export function compare(a: string, b: string): "<" | ">" | "=";
export function cube(
base: string,
options?: { ellipsis?: boolean; fraction?: boolean; imaginary?: boolean; max_decimal_digits?: number; zero_to_the_power_of_zero?: string }
): string;
export function cube_root(radicand: string, options?: { imaginary?: boolean; max_decimal_digits?: number }): string;
export function divide(dividend: string, divisor: string, options?: { max_decimal_digits: number; ellipsis: boolean }): string;
export function factorial(n: string): string;
export function flip_sign(n: string): string;
export function floor(n: string): string;
// you can also pass in max(a, b, c, d) but I'm not sure how to type that
export function max(nums: string[]): string;
// you can also pass in min(a, b, c, d) but I'm not sure how to type that
export function min(nums: string[]): string;
export function multiply(
a: string,
b: string,
options?: {
max_decimal_digits?: number;
infinity_times_zero?: string;
}
): string;
export function ols(
nums: string[][] | [string, string][] | Readonly<[string, string]>[] | Readonly<Readonly<[string, string]>[]>,
options?: { max_decimal_digits?: number }
): { b: string; m: string };
export function pow(
base: string,
exponent: string,
options?: { ellipsis?: boolean; fraction?: boolean; imaginary?: boolean; max_decimal_digits?: number; zero_to_the_power_of_zero?: string }
): string;
export function remainder(dividend: string, divisor: string): string;
export function root(radicand: string, index: string, options?: { imaginary?: boolean; max_decimal_digits?: number }): string;
export function sign(n: string): string;
export function square(
base: string,
options?: { ellipsis?: boolean; fraction?: boolean; imaginary?: boolean; max_decimal_digits?: number; zero_to_the_power_of_zero?: string }
): string;
export function square_root(radicand: string, options?: { imaginary?: boolean; max_decimal_digits?: number }): string;
export function subtract(a: string, b: string, options?: { infinity_minus_infinity?: string }): string;
export function truncate(n: string);
declare const preciso: {
absolute: typeof absolute;
add: typeof add;
binomial_coefficient: typeof binomial_coefficient;
ceil: typeof ceil;
compare: typeof compare;
divide: typeof divide;
floor: typeof floor;
max: typeof max;
min: typeof min;
multiply: typeof multiply;
pow: typeof pow;
remainder: typeof remainder;
sign: typeof sign;
subtract: typeof subtract;
truncate: typeof truncate;
};
export default preciso;