← All repos

proposal-float16array

a proposal to add float16 TypedArrays to JavaScript

Browse cluster: WebAssembly Specification and Proposals
13commits
2contributors
1languages

Tech stack & purpose

This project proposes adding Float16Array, a half-precision floating-point TypedArray, to JavaScript. The proposal addresses use cases in GPU operations, WebGPU interoperability, machine learning frameworks like Stable Diffusion, and graphics APIs including WebGL and WebGL2, where full 32-bit or 64-bit precision is unnecessary and memory constraints are significant. The proposal adds `Float16Array` as a new TypedArray type, along with `getFloat16` and `setFloat16` methods for DataView and a `Math.f16round` function. Kevin Gibbons authored the proposal with Leo Balter and Kevin Gibbons as champions, and it reached Stage 4 of the TC39 standardization process as of February 2025, having already landed in the ECMAScript specification and begun shipping in browsers.

Languages

HTML
100.0%

Contributors