import type { GMPFunctions } from './functions';
import { Float } from './float';
import { Integer } from './integer';
declare type RationalFactoryReturn = ReturnType<typeof getRationalContext>['Rational'];
export interface RationalFactory extends RationalFactoryReturn {
}
declare type RationalReturn = ReturnType<RationalFactoryReturn>;
export interface Rational extends RationalReturn {
}
declare type AllTypes = Integer | Rational | Float | number;
declare type OutputType<T> = T extends number ? Rational : T extends Integer ? Rational : T extends Rational ? Rational : T extends Float ? Float : never;
export declare function getRationalContext(gmp: GMPFunctions, ctx: any): {
    Rational: (p1: string | number | Rational | Integer, p2?: string | number | Integer) => {
        mpq_t: number;
        type: string;
        add<T extends AllTypes>(val: T): OutputType<T>;
        sub<T_1 extends AllTypes>(val: T_1): OutputType<T_1>;
        mul<T_2 extends AllTypes>(val: T_2): OutputType<T_2>;
        neg(): Rational;
        invert(): Rational;
        abs(): Rational;
        div<T_3 extends AllTypes>(val: T_3): OutputType<T_3>;
        isEqual(val: AllTypes): boolean;
        lessThan(val: AllTypes): boolean;
        lessOrEqual(val: AllTypes): boolean;
        greaterThan(val: AllTypes): boolean;
        greaterOrEqual(val: AllTypes): boolean;
        numerator(): Integer;
        denominator(): Integer;
        sign(): number;
        toNumber(): number;
        toString(): string;
    };
    isRational: (val: any) => boolean;
    destroy: () => void;
};
export {};
