UNPKG

@technobuddha/library

Version:
16 lines (15 loc) 659 B
import { type DeconstructedNumber } from './@types/deconstructed-number.ts'; /** * Reconstructs a number from its deconstructed representation. * @param deconstructed - An object containing the sign, mantissa, and exponent of the number. * @returns The reconstructed number. * @example * ```typescript * constructNumber({ sign: 1, mantissa: '123', exponent: 0 }); // 1.23 * constructNumber({ sign: -1, mantissa: '500', exponent: 2 }); // -5 * constructNumber({ sign: 1, mantissa: '', exponent: 0 }); // 0 * ``` * @group Math * @category Number */ export declare function constructNumber(deconstructed: Omit<DeconstructedNumber, 'value'>): number;