Closed BruceDai closed 2 years ago
Thanks @huningxin .
I updated PR following your suggestion, now new getBitwise()
function is only for float32
data
function getBitwise(value) {
const buffer = new ArrayBuffer(4);
const view = new DataView(buffer);
view.setFloat32(0, value);
return view.getInt32(0);
}
About bitwise of float32 data, I compared the return value of this JS function with one of native C++ GetBitwise()
function, they are same.
@huningxin Please take a look again, thanks.
Thanks much @huningxin. I've updated commit to fix your review comments, PTAL, Thanks.
@huningxin I updated PR, PTAL, thanks.
I rebased this PR to only add JavaScript's ULP based comparison implementation.
@huningxin PTAL, thanks.
@huningxin I implemented JavaScript
compareUlp()
function to align Chai's comment on #2, PTAL, thanks.