import { typedSchemas } from "../widgets/registry"; /** * Calculates the greatest common divisor (GCD) of two numbers using the Euclidean algorithm. * @param a The first number. * @param b The second number. * @returns The GCD of a and b. */ export declare function gcd(a: number, b: number): number; /** * Determines if a fraction results in a terminating decimal. * A fraction terminates if and only if the prime factors of its simplified denominator are only 2s and 5s. * @param numerator The numerator of the fraction. * @param denominator The denominator of the fraction. * @returns True if the fraction terminates, false otherwise. */ export declare function isTerminatingFraction(numerator: number, denominator: number): boolean; export declare function encodeDataUri(content: string): string; export declare function isValidWidgetType(type: string): type is keyof typeof typedSchemas; /** * Attempts to approximate simple multiplicative/divisive expressions that include π or pi * by replacing pi with the provided approximation (default 3.14) and evaluating the expression. * * Supported forms (case-insensitive for "pi"): * - "144*pi", "pi*144", "144pi" (implicit multiplication), "pi144" (rare, but treated as pi*144) * - Chains with '*' and '/' only, e.g. "3/2*pi", "pi/4", "6*pi/5", "(144) * (pi)" * Parentheses are allowed but only for grouping; no addition/subtraction is supported. * * Returns a normalized decimal string if evaluation succeeds, otherwise null. */ export declare function tryApproximatePiProduct(rawExpr: string, piApprox?: number): string | null; //# sourceMappingURL=helpers.d.ts.map