Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | function test1(x) { |
michael@0 | 2 | return (x*((2<<23)-1))|0 |
michael@0 | 3 | } |
michael@0 | 4 | function test2(x) { |
michael@0 | 5 | return (x*((2<<22)-1))|0 |
michael@0 | 6 | } |
michael@0 | 7 | function test3(x) { |
michael@0 | 8 | return (x*((2<<21)-1))|0 |
michael@0 | 9 | } |
michael@0 | 10 | function test4(x) { |
michael@0 | 11 | var b = x + x + 3 |
michael@0 | 12 | return (b*b) | 0 |
michael@0 | 13 | } |
michael@0 | 14 | //MAX_INT |
michael@0 | 15 | var x = 0x7ffffffe; |
michael@0 | 16 | assertEq(test1(x), 2113929216); |
michael@0 | 17 | assertEq(test2(x), 2130706434); |
michael@0 | 18 | assertEq(test3(x), 2139095042); |
michael@0 | 19 | assertEq(test4(x), 0); |