We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Both functions readFloat64BE and readFloat64LE are buggy at the following line:
(((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)
If you do, for example: var b5 = 0, b6 = 0, b7 = 0, b8 = 0;
The expected value should be "0000000000000000000000000000000" (31 zeros), but instead it returns "0"
I solved it by using:
("000000000000000000000000000000" + (((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)).substr(-31)
But this solution isn't cross-browser.
Tested on Firefox 12.0
Thank you for your great work.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Both functions readFloat64BE and readFloat64LE are buggy at the following line:
(((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)
If you do, for example:
var b5 = 0, b6 = 0, b7 = 0, b8 = 0;
The expected value should be "0000000000000000000000000000000" (31 zeros), but instead it returns "0"
I solved it by using:
("000000000000000000000000000000" + (((b5 & 0x7F) << 24) | (b6 << 16) | (b7 << 8) | b8).toString(2)).substr(-31)
But this solution isn't cross-browser.
Tested on Firefox 12.0
Thank you for your great work.
The text was updated successfully, but these errors were encountered: