Encode and decode float16
$ npm install float16
const { byteToFloat16, float16ToByte } = require('float16');
byteToFloat16(0x3c00)).toBe(1);
byteToFloat16(1)).toBe(0x3c00);
Encode and decode float16
$ npm install float16
const { byteToFloat16, float16ToByte } = require('float16');
byteToFloat16(0x3c00)).toBe(1);
byteToFloat16(1)).toBe(0x3c00);