/wasm2js_i64tof32

wait, what?

Primary LanguageJavaScript

Imprecise i64 to f32 in JS

Math.fround(Number(18446743523953737727n));

!=

(float)18446743523953737727ULL;

For full context, see: WebAssembly/binaryen#3024

Instructions

  • git clone https://github.com/dcodeIO/wasm2js_i64tof32.git
  • cd wasm2js_i64tof32
  • npm install
  • npm test
  • Improve assembly/index.ts
  • npm test again