Comment by dzaima
2 days ago
Chromium & Node (i.e. V8) do seem to just not normalize:
arr = new Float64Array([0]);
arr[0] = new Float64Array(new BigUint64Array([-123n]).buffer)[0];
[...new Uint8Array(arr.buffer)] // [133, 255, 255, 255, 255, 255, 255, 255]
Running the following snippets:
I get on Chrome:
And on Firefox:
It looks like both implementations are buggy, Since both the DataView and buffer versions should be normalized.
https://bugzilla.mozilla.org/show_bug.cgi?id=1393085