UNPKG

@petamoriken/float16

Version:

IEEE 754 half-precision floating-point for JavaScript

11 lines (9 loc) 238 B
import { roundToFloat16 } from "./_util/converter.mjs"; /** * returns the nearest half-precision float representation of a number * @param {number} x * @returns {number} */ export function f16round(x) { return roundToFloat16(x); }