I found a code from here that converts Javascript number to inner IEEE representation as two Uint32 values:
function DoubleToIEEE(f)
{
var buf = new ArrayB
I found a possible solution, which seems to work:
function IEEEToDouble(f)
{
var buffer = new ArrayBuffer(8);
(new Uint32Array(buffer))[0] = f[0];
(new Uint32Array(buffer))[1] = f[1];
return new Float64Array(buffer)[0];
}
Usage:
var a = DoubleToIEEE(-0.1234);
console.log(a); // [0, 3220176896]
var b = IEEEToDouble(a);
console.log(b); // -0.1234