This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decodeFloat32(bytes) { | |
var sign = (bytes & 0x80000000) ? -1 : 1; | |
var exponent = ((bytes >> 23) & 0xFF) - 127; | |
var significand = (bytes & ~(-1 << 23)); | |
if (exponent == 128) | |
return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY); | |
if (exponent == -127) { | |
if (significand == 0) return sign * 0.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decodeFloat32(bytes) { | |
var sign = (bytes & 0x80000000) ? -1 : 1; | |
var exponent = ((bytes >> 23) & 0xFF) - 127; | |
var significand = (bytes & ~(-1 << 23)); | |
if (exponent == 128) | |
return sign * ((significand) ? Number.NaN : Number.POSITIVE_INFINITY); | |
if (exponent == -127) { | |
if (significand == 0) return sign * 0.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xf2980ad42f9295B88f3bD15E1232fA568b4ca840 |