import type { MathFormat } from "@khanacademy/perseus-core"; declare const KhanMath: { readonly cleanMath: (expr: string) => string; readonly bound: (num: number) => number; readonly factorial: (x: number) => number; readonly getGCD: (a: number, b: number) => number; readonly getLCM: (a: number, b: number) => number; readonly primes: readonly [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]; readonly isPrime: (n: number) => boolean; readonly getPrimeFactorization: (number: number) => ReadonlyArray; readonly roundToNearest: (increment: number, num: number) => number; readonly roundTo: (precision: number, num: number) => number; /** * Return a string of num rounded to a fixed precision decimal places, * with an approx symbol if num had to be rounded, and trailing 0s */ readonly toFixedApprox: (num: number, precision: number) => string; /** * Return a string of num rounded to precision decimal places, with an * approx symbol if num had to be rounded, but no trailing 0s if it was * not rounded. */ readonly roundToApprox: (num: number, precision: number) => string; readonly toFraction: (decimal: number, tolerance?: number) => [number, number]; readonly getNumericFormat: (text: string) => MathFormat | null; readonly toNumericString: (number: number | null, format?: MathFormat) => string; }; export declare function sum(array: number[]): number; export default KhanMath;