import { eps } from "@lvlte/ulp"; /** * Represent a floating point number `x` as a rational number `[p, q]` where * `|x - p/q| ≤ tol` (the result will differ from x by no more than the given * tolerance). * * @param x The input number * @param tol The absolute tolerance (default: `eps(x)`) * @returns A tuple `[p, q]` representing the rational number `p/q` */ declare function rationalize(x: number, tol?: number): [number, number]; declare namespace rationalize { var fromLiteral: (x: number) => [number, number]; } /** * Represent a floating point number `x` as a rational number `[p, q]` where * `|x - p/q| ≤ tol` (the result will differ from x by no more than the given * tolerance). * * @param x The input number * @param tol The absolute tolerance (default: `eps(x)`) * @returns A `bigint` tuple `[p, q]` representing the rational number `p/q` */ export declare function rationalizeBig(x: number, tol?: number): [bigint, bigint]; export declare namespace rationalizeBig { var fromLiteral: (x: number) => [bigint, bigint]; } export { eps, rationalize };