@Test public void testToUInt3201() { assertEquals(0.0, ToUInt32(NaN), 0.0); assertEquals(0.0, ToUInt32("abc"), 0.0); assertEquals(+0.0, ToUInt32(+0.0), 0.0); assertEquals(+0.0, ToUInt32(-0.0), 0.0); assertEquals(0.0, ToUInt32(Double.POSITIVE_INFINITY), 0.0); assertEquals(0.0, ToUInt32(Double.NEGATIVE_INFINITY), 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; }