File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ var protobuf = require("..");
88
99tape . test ( "floats" , function ( test ) {
1010
11- test . equal ( 1.401298464324817e-45 , Math . pow ( 2 , - 149 ) , "literal 2^-149 should match calculated" ) ;
12- test . equal ( 5e-324 , Math . pow ( 2 , - 1074 ) , "literal 2^-1074 should match calculated" ) ;
11+ // The following assertions were meant to validate that using float literals instead of pre-calculated
12+ // vars is safe. Turned out that these tests pass on all platforms except Edge 13/14 (which doesn't even
13+ // use the float fallback), where it failed because of the complete opposite: Math.pow(2, -1074) => 0
14+
15+ // test.equal(1.401298464324817e-45, Math.pow(2, -149), "literal 2^-149 should match calculated");
16+ // test.equal(5e-324, Math.pow(2, -1074), "literal 2^-1074 should match calculated");
1317
1418 var common = [
1519 0 ,
You can’t perform that action at this time.
0 commit comments