UNPKG

@technobuddha/library

Version:
26 lines (25 loc) 956 B
import { type DeconstructedNumber } from './@types/deconstructed-number.ts'; import { type Numbering } from './numbering.ts'; /** * Represents the result of a fraction operation, containing both the numerator and denominator. * @internal */ type FractionResult = { /** * The numerator part of the fraction. */ numerator: number; /** * The denominator part of the fraction. */ denominator: number; }; /** * Finds the closest fractional representation of a given number within a specified tolerance and precision. * @param input - The decimal number to approximate as a fraction. * @param options - Configuration options for the fraction search. * @returns An object containing the numerator and denominator of the closest fraction. * @internal */ export declare function deriveFraction(input: DeconstructedNumber, options: Pick<Numbering, 'tolerance' | 'precision' | 'denominators'>): FractionResult; export {};