UNPKG

fp16

Version:

Half-precision 16-bit floating point numbers

20 lines (19 loc) 709 B
export declare const float32View: DataView<ArrayBuffer>; export declare const float16Precision = 10; export declare const float16Emax = 15; export declare const float16Emin = -14; export declare const float32Precision = 23; export declare const float32Emax = 127; export declare const float32Emin = -126; /** * * @param value an int32 representing the bits of a float32 * @returns a pretty string showing the sign, exponent, and mantissa bits */ export declare function format32(value: number): string; /** * * @param value a uint16 representing the bits of a float16 * @returns a pretty string showing the sign, exponent, and mantissa bits */ export declare function format16(value: number): string;