@Test public void testToUInt3202() { assertEquals(1.0, ToUInt32(1.2345), 0.0); assertEquals(4294967291.0, ToUInt32(-5.4321), 0.0); assertEquals(0.0, ToUInt32(0.0), 0.0); assertEquals(1.0, ToUInt32(1), 0.0); assertEquals(4294967295.0, ToUInt32(-1), 0.0); assertEquals(4294967295.0, ToUInt32(4294967295.0), 0.0); assertEquals(4294967294.0, ToUInt32(4294967294.0), 0.0); assertEquals(0.0, ToUInt32(4294967296.0), 0.0); assertEquals(2147483649.0, ToUInt32(-2147483647.0), 0.0); assertEquals(2147483648.0, ToUInt32(-2147483648.0), 0.0); assertEquals(2147483647.0, ToUInt32(-2147483649.0), 0.0); assertEquals(1.0, ToUInt32(-4294967295.0), 0.0); assertEquals(0.0, ToUInt32(-4294967296.0), 0.0); assertEquals(4294967295.0, ToUInt32(-4294967297.0), 0.0); assertEquals(4294967295.0, ToUInt32(4294967295.0), 0.0); assertEquals(0.0, ToUInt32(4294967296.0), 0.0); assertEquals(1.0, ToUInt32(4294967297.0), 0.0); assertEquals(4294967295.0, ToUInt32(8589934591.0), 0.0); assertEquals(0.0, ToUInt32(8589934592.0), 0.0); assertEquals(1.0, ToUInt32(8589934593.0), 0.0); }
static Double ToUInt32(Object arg) { Double number = ToNumber(arg); if (number.isNaN() || number.isInfinite() || number == 0.0) { return 0.0; } Double posInt = ToInteger(number); BigInteger posIntBig = new BigInteger(PLAIN_INTEGER_FORMAT.format(posInt)); BigInteger int32bit = posIntBig.mod(UINT_MAX_VALUE); return int32bit.doubleValue(); }
JSAbstractOperations { static Double ToUInt32(Object arg) { Double number = ToNumber(arg); if (number.isNaN() || number.isInfinite() || number == 0.0) { return 0.0; } Double posInt = ToInteger(number); BigInteger posIntBig = new BigInteger(PLAIN_INTEGER_FORMAT.format(posInt)); BigInteger int32bit = posIntBig.mod(UINT_MAX_VALUE); return int32bit.doubleValue(); } }
JSAbstractOperations { static Double ToUInt32(Object arg) { Double number = ToNumber(arg); if (number.isNaN() || number.isInfinite() || number == 0.0) { return 0.0; } Double posInt = ToInteger(number); BigInteger posIntBig = new BigInteger(PLAIN_INTEGER_FORMAT.format(posInt)); BigInteger int32bit = posIntBig.mod(UINT_MAX_VALUE); return int32bit.doubleValue(); }  }
JSAbstractOperations { static Double ToUInt32(Object arg) { Double number = ToNumber(arg); if (number.isNaN() || number.isInfinite() || number == 0.0) { return 0.0; } Double posInt = ToInteger(number); BigInteger posIntBig = new BigInteger(PLAIN_INTEGER_FORMAT.format(posInt)); BigInteger int32bit = posIntBig.mod(UINT_MAX_VALUE); return int32bit.doubleValue(); }   }
JSAbstractOperations { static Double ToUInt32(Object arg) { Double number = ToNumber(arg); if (number.isNaN() || number.isInfinite() || number == 0.0) { return 0.0; } Double posInt = ToInteger(number); BigInteger posIntBig = new BigInteger(PLAIN_INTEGER_FORMAT.format(posInt)); BigInteger int32bit = posIntBig.mod(UINT_MAX_VALUE); return int32bit.doubleValue(); }   static final BigInteger UINT_MAX_VALUE; static final Double UINT_MAX_VALUE_D; static final BigInteger SINT_MAX_VALUE; static final BigInteger USHORT_MAX_VALUE; }