/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerConstructorsTest.java | 59 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive1() 75 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive2() 91 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive3() 107 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorBytesPositive() 123 assertEquals("incorrect sign", -1, aNumber.signum()); in testConstructorBytesNegative1() 139 assertEquals("incorrect sign", -1, aNumber.signum()); in testConstructorBytesNegative2() 155 assertEquals("incorrect sign", -1, aNumber.signum()); in testConstructorBytesNegative3() 171 assertEquals("incorrect sign", -1, aNumber.signum()); in testConstructorBytesNegative4() 186 assertEquals("incorrect sign", 0, aNumber.signum()); in testConstructorBytesZero() 233 assertEquals("incorrect sign", 1, aNumber.signum()); in testConstructorSignBytesPositive1() [all …]
|
D | BigIntegerOperateBitsTest.java | 154 assertEquals("incorrect sign", 0, result.signum()); in testClearBitZero() 172 assertEquals("incorrect sign", 0, result.signum()); in testClearBitZeroOutside1() 190 assertEquals("incorrect sign", -1, result.signum()); in testClearBitNegativeInside1() 208 assertEquals("incorrect sign", -1, result.signum()); in testClearBitNegativeInside2() 265 assertEquals("incorrect sign", -1, result.signum()); in testClearBitNegativeOutside1() 283 assertEquals("incorrect sign", -1, result.signum()); in testClearBitNegativeOutside2() 301 assertEquals("incorrect sign", 1, result.signum()); in testClearBitPositiveInside1() 319 assertEquals("incorrect sign", 1, result.signum()); in testClearBitPositiveInside2() 337 assertEquals("incorrect sign", 1, result.signum()); in testClearBitPositiveInside3() 355 assertEquals("incorrect sign", 1, result.signum()); in testClearBitPositiveInside4() [all …]
|
D | BigIntegerAddTest.java | 48 assertEquals("incorrect sign", 1, result.signum()); in testCase1() 68 assertEquals("incorrect sign", -1, result.signum()); in testCase2() 90 assertEquals("incorrect sign", 1, result.signum()); in testCase3() 112 assertEquals("incorrect sign", -1, result.signum()); in testCase4() 134 assertEquals("incorrect sign", -1, result.signum()); in testCase5() 156 assertEquals("incorrect sign", 1, result.signum()); in testCase6() 177 assertEquals("incorrect sign", 1, result.signum()); in testCase7() 196 assertEquals("incorrect sign", 1, result.signum()); in testCase8() 217 assertEquals("incorrect sign", -1, result.signum()); in testCase9() 238 assertEquals("incorrect sign", -1, result.signum()); in testCase10() [all …]
|
D | BigIntegerAndTest.java | 48 assertEquals("incorrect sign", 0, result.signum()); in testZeroPos() 68 assertEquals("incorrect sign", 0, result.signum()); in testZeroNeg() 88 assertEquals("incorrect sign", 0, result.signum()); in testPosZero() 108 assertEquals("incorrect sign", 0, result.signum()); in testNegPos() 128 assertEquals("incorrect sign", 0, result.signum()); in testZeroZero() 139 assertEquals("incorrect sign", 0, result.signum()); in testZeroOne() 150 assertEquals("incorrect sign", 1, result.signum()); in testOneOne() 170 assertEquals("incorrect sign", 1, result.signum()); in testPosPosSameLength() 190 assertEquals("incorrect sign", 1, result.signum()); in testPosPosFirstLonger() 210 assertEquals("incorrect sign", 1, result.signum()); in testPosPosFirstShorter() [all …]
|
D | BigIntegerSubtractTest.java | 49 assertEquals(1, result.signum()); in testCase1() 70 assertEquals(-1, result.signum()); in testCase2() 92 assertEquals(1, result.signum()); in testCase3() 114 assertEquals(1, result.signum()); in testCase4() 135 assertEquals(-1, result.signum()); in testCase5() 156 assertEquals(1, result.signum()); in testCase6() 178 assertEquals(-1, result.signum()); in testCase7() 200 assertEquals(-1, result.signum()); in testCase8() 221 assertEquals(1, result.signum()); in testCase9() 242 assertEquals(-1, result.signum()); in testCase10() [all …]
|
D | BigIntegerDivideTest.java | 80 assertEquals("incorrect sign", 1, result.signum()); in testCase3() 100 assertEquals("incorrect sign", -1, result.signum()); in testCase4() 121 assertEquals("incorrect sign", 0, result.signum()); in testCase5() 142 assertEquals("incorrect sign", 0, result.signum()); in testCase6() 162 assertEquals("incorrect sign", 1, result.signum()); in testCase7() 182 assertEquals("incorrect sign", -1, result.signum()); in testCase8() 202 assertEquals("incorrect sign", -1, result.signum()); in testCase9() 222 assertEquals("incorrect sign", 1, result.signum()); in testCase10() 242 assertEquals("incorrect sign", 0, result.signum()); in testCase11() 260 assertEquals("incorrect sign", 0, result.signum()); in testCase12() [all …]
|
D | BigIntegerMultiplyTest.java | 48 assertEquals("incorrect sign", 1, result.signum()); in testCase1() 69 assertEquals("incorrect sign", -1, result.signum()); in testCase2() 91 assertEquals("incorrect sign", 1, result.signum()); in testCase3() 113 assertEquals("incorrect sign", 1, result.signum()); in testCase4() 136 assertEquals("incorrect sign", -1, result.signum()); in testCase5() 159 assertEquals("incorrect sign", -1, result.signum()); in testCase6() 179 assertEquals("incorrect sign", 0, result.signum()); in testCase7() 197 assertEquals("incorrect sign", 0, result.signum()); in testCase8() 215 assertEquals("incorrect sign", 1, result.signum()); in testCase9() 233 assertEquals("incorrect sign", -1, result.signum()); in testCase10() [all …]
|
D | BigIntegerOrTest.java | 48 assertEquals("incorrect sign", 1, result.signum()); in testZeroPos() 68 assertEquals("incorrect sign", -1, result.signum()); in testZeroNeg() 88 assertEquals("incorrect sign", 1, result.signum()); in testPosZero() 108 assertEquals("incorrect sign", -1, result.signum()); in testNegPos() 128 assertEquals("incorrect sign", 0, result.signum()); in testZeroZero() 148 assertEquals("incorrect sign", 1, result.signum()); in testZeroOne() 168 assertEquals("incorrect sign", 1, result.signum()); in testOneOne() 188 assertEquals("incorrect sign", 1, result.signum()); in testPosPosSameLength() 208 assertEquals("incorrect sign", 1, result.signum()); in testPosPosFirstLonger() 228 assertEquals("incorrect sign", 1, result.signum()); in testPosPosFirstShorter() [all …]
|
D | BigIntegerNotTest.java | 48 assertEquals("incorrect sign", 1, result.signum()); in testAndNotPosPosFirstLonger() 68 assertEquals("incorrect sign", 1, result.signum()); in testAndNotPosPosFirstShorter() 88 assertEquals("incorrect sign", 1, result.signum()); in testAndNotNegNegFirstLonger() 108 assertEquals("incorrect sign", -1, result.signum()); in testNegPosFirstLonger() 123 assertEquals("incorrect sign", -1, result.signum()); in testNotZero() 138 assertEquals("incorrect sign", -1, result.signum()); in testNotOne() 155 assertEquals("incorrect sign", -1, result.signum()); in testNotPos() 172 assertEquals("incorrect sign", 1, result.signum()); in testNotNeg() 190 assertEquals("incorrect sign", -1, result.signum()); in testNotSpecialCase()
|
D | BigIntegerCompareTest.java | 45 assertEquals("incorrect sign", 1, result.signum()); in testAbsPositive() 62 assertEquals("incorrect sign", 1, result.signum()); in testAbsNegative() 311 assertTrue("incorrect sign", result.signum() == 1); in testMaxGreater() 332 assertTrue("incorrect sign", result.signum() == 1); in testMaxLess() 353 assertEquals("incorrect sign", 1, result.signum()); in testMaxEqual() 372 assertTrue("incorrect sign", result.signum() == 0); in testMaxNegZero() 393 assertEquals("incorrect sign", 1, result.signum()); in testMinGreater() 414 assertEquals("incorrect sign", 1, result.signum()); in testMinLess() 435 assertTrue("incorrect sign", result.signum() == 1); in testMinEqual() 454 assertTrue("incorrect sign", result.signum() == 0); in testMinPosZero() [all …]
|
D | BigIntegerModPowTest.java | 78 assertEquals("incorrect sign", 1, result.signum()); in testModPowPosExp() 101 assertEquals("incorrect sign", 1, result.signum()); in testModPowNegExp() 178 assertEquals("incorrect sign", 1, result.signum()); in testmodInversePos1() 198 assertEquals("incorrect sign", 1, result.signum()); in testmodInversePos2() 218 assertEquals("incorrect sign", 1, result.signum()); in testmodInverseNeg1() 236 assertEquals("incorrect sign", 1, result.signum()); in testmodInverseNeg2() 256 assertEquals("incorrect sign", 1, result.signum()); in testGcdSecondZero() 276 assertEquals("incorrect sign", 1, result.signum()); in testGcdFirstZero() 294 assertEquals("incorrect sign", 1, result.signum()); in testGcdFirstZERO() 309 assertEquals("incorrect sign", 0, result.signum()); in testGcdBothZeros() [all …]
|
D | BigIntegerTest.java | 334 assertTrue("Wrong positive signum", two.signum() == 1); in test_signum() 335 assertTrue("Wrong zero signum", zero.signum() == 0); in test_signum() 336 assertTrue("Wrong neg zero signum", zero.negate().signum() == 0); in test_signum() 337 assertTrue("Wrong neg signum", two.negate().signum() == -1); in test_signum() 451 assertTrue("a non-neg", a.signum() >= 0); in test_shiftRightI() 457 assertTrue("c non-neg", c.signum() >= 0); in test_shiftRightI() 463 assertTrue("e negative", e.signum() == -1); in test_shiftRightI() 500 assertTrue("a non-neg", a.signum() >= 0); in test_shiftLeftI() 507 assertTrue("c negative", c.signum() == -1); in test_shiftLeftI() 913 .signum() != 0 in testDiv() [all …]
|
D | BigIntegerConvertTest.java | 669 assertEquals("incorrect sign", 1, aNumber.signum()); in testValueOfIntegerMax() 684 assertEquals("incorrect sign", -1, aNumber.signum()); in testValueOfIntegerMin() 699 assertEquals("incorrect sign", 1, aNumber.signum()); in testValueOfLongMax() 714 assertEquals("incorrect sign", -1, aNumber.signum()); in testValueOfLongMin() 729 assertEquals("incorrect sign", 1, aNumber.signum()); in testValueOfLongPositive1() 745 assertEquals("incorrect sign", 1, aNumber.signum()); in testValueOfLongPositive2() 760 assertEquals("incorrect sign", -1, aNumber.signum()); in testValueOfLongNegative1() 776 assertEquals("incorrect sign", -1, aNumber.signum()); in testValueOfLongNegative2() 790 assertEquals("incorrect sign", 0, aNumber.signum()); in testValueOfLongZero()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | OldAndroidStrictMathTest.java | 458 assertTrue(Double.isNaN(StrictMath.signum(Double.NaN))); in testSignumD() 460 .doubleToLongBits(StrictMath.signum(0.0))); in testSignumD() 462 .doubleToLongBits(StrictMath.signum(+0.0))); in testSignumD() 464 .doubleToLongBits(StrictMath.signum(-0.0))); in testSignumD() 466 assertEquals(1.0, StrictMath.signum(253681.2187962), 0D); in testSignumD() 467 assertEquals(-1.0, StrictMath.signum(-125874693.56), 0D); in testSignumD() 468 assertEquals(1.0, StrictMath.signum(1.2587E-308), 0D); in testSignumD() 469 assertEquals(-1.0, StrictMath.signum(-1.2587E-308), 0D); in testSignumD() 471 assertEquals(1.0, StrictMath.signum(Double.MAX_VALUE), 0D); in testSignumD() 472 assertEquals(1.0, StrictMath.signum(Double.MIN_VALUE), 0D); in testSignumD() [all …]
|
D | OldAndroidMathTest.java | 481 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in testSignumD() 482 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in testSignumD() 484 .signum(0.0))); in testSignumD() 486 .doubleToLongBits(Math.signum(+0.0))); in testSignumD() 488 .doubleToLongBits(Math.signum(-0.0))); in testSignumD() 490 assertEquals(1.0, Math.signum(253681.2187962), 0D); in testSignumD() 491 assertEquals(-1.0, Math.signum(-125874693.56), 0D); in testSignumD() 492 assertEquals(1.0, Math.signum(1.2587E-308), 0D); in testSignumD() 493 assertEquals(-1.0, Math.signum(-1.2587E-308), 0D); in testSignumD() 495 assertEquals(1.0, Math.signum(Double.MAX_VALUE), 0D); in testSignumD() [all …]
|
D | LongTest.java | 54 assertEquals(0, Long.signum(0)); 55 assertEquals(1, Long.signum(1)); 56 assertEquals(-1, Long.signum(-1)); 57 assertEquals(1, Long.signum(Long.MAX_VALUE)); 58 assertEquals(-1, Long.signum(Long.MIN_VALUE));
|
/libcore/luni/src/main/java/java/math/ |
D | BigDecimal.java | 811 largerSignum = larger.signum(); in add() 812 if (largerSignum == smaller.signum()) { in add() 903 thisSignum = this.signum(); in subtract() 904 if (thisSignum != subtrahend.signum()) { in subtract() 944 (Math.signum(smallValue) * Math.signum(multiplicand.smallValue) > 0); in multiply() 1089 if (remainder.signum() == 0) { in divideBigIntegers() 1092 int sign = scaledDividend.signum() * scaledDivisor.signum(); in divideBigIntegers() 1122 int sign = Long.signum( scaledDividend ) * Long.signum( scaledDivisor ); in dividePrimitiveLongs() 1217 if (p.signum() == 0) { in divide() 1230 if (quotAndRem[1].signum() == 0) { in divide() [all …]
|
D | BigInteger.java | 88 private int signum; field in BigInteger 271 public BigInteger(int signum, byte @NonNull [] magnitude) { in BigInteger() argument 275 if (signum < -1 || signum > 1) { in BigInteger() 276 throw new NumberFormatException("Invalid signum: " + signum); in BigInteger() 278 if (signum == 0) { in BigInteger() 286 bigInt.putBigEndian(magnitude, signum < 0); in BigInteger() 448 public int signum() { in signum() method in BigInteger 488 int sign = signum(); in shiftLeft() 503 return (signum() == 0) ? this : BitLevel.shiftLeftOneBit(this); in shiftLeftOneBit() 542 int sign = signum(); in testBit() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StrictMathTest.java | 1302 assertTrue(Double.isNaN(StrictMath.signum(Double.NaN))); in test_signum_D() 1304 .doubleToLongBits(StrictMath.signum(0.0))); in test_signum_D() 1306 .doubleToLongBits(StrictMath.signum(+0.0))); in test_signum_D() 1308 .doubleToLongBits(StrictMath.signum(-0.0))); in test_signum_D() 1310 assertEquals(1.0, StrictMath.signum(253681.2187962), 0D); in test_signum_D() 1311 assertEquals(-1.0, StrictMath.signum(-125874693.56), 0D); in test_signum_D() 1312 assertEquals(1.0, StrictMath.signum(1.2587E-308), 0D); in test_signum_D() 1313 assertEquals(-1.0, StrictMath.signum(-1.2587E-308), 0D); in test_signum_D() 1315 assertEquals(1.0, StrictMath.signum(Double.MAX_VALUE), 0D); in test_signum_D() 1316 assertEquals(1.0, StrictMath.signum(Double.MIN_VALUE), 0D); in test_signum_D() [all …]
|
D | MathTest.java | 1732 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in test_signum_D() 1733 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in test_signum_D() 1735 .signum(0.0))); in test_signum_D() 1737 .doubleToLongBits(Math.signum(+0.0))); in test_signum_D() 1739 .doubleToLongBits(Math.signum(-0.0))); in test_signum_D() 1741 assertEquals(1.0, Math.signum(253681.2187962), 0D); in test_signum_D() 1742 assertEquals(-1.0, Math.signum(-125874693.56), 0D); in test_signum_D() 1743 assertEquals(1.0, Math.signum(1.2587E-308), 0D); in test_signum_D() 1744 assertEquals(-1.0, Math.signum(-1.2587E-308), 0D); in test_signum_D() 1746 assertEquals(1.0, Math.signum(Double.MAX_VALUE), 0D); in test_signum_D() [all …]
|
/libcore/luni/src/test/resources/ |
D | math_java_only.csv | 183 signum,-0x1.0p0,-0x1.8ec3beb2d4185p1023 184 signum,-0x1.0p0,-0x1.a49ea827e7d05p1023 185 signum,-0x1.0p0,-0x1.47afe754a89fep1021 186 signum,-0x1.0p0,-0x1.ea33b08c7fbfbp1022 187 signum,0x1.0p0,0x1.40c8f2c416881p1023 188 signum,-0x1.0p0,-0x1.d2762c5e7c22bp1022 189 signum,0x1.0p0,0x1.0c0c8b67b7daep1021 190 signum,-0x1.0p0,-0x1.800e50b80ea85p1023 191 signum,0x1.0p0,0x1.ccf6eeb86909cp1020 192 signum,-0x1.0p0,-0x1.6d6d5ccb7231fp1022 [all …]
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | FpUtils.java | 905 public static double signum(double d) { in signum() method in FpUtils 906 return Math.signum(d); in signum() 928 public static float signum(float f) { in signum() method in FpUtils 929 return Math.signum(f); in signum()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 1188 public static double signum(double d) { in signum() method in StrictMath 1189 return Math.signum(d); in signum() 1209 public static float signum(float f) { in signum() method in StrictMath 1210 return Math.signum(f); in signum()
|
/libcore/ojluni/annotations/hiddenapi/sun/misc/ |
D | FpUtils.java | 159 public static double signum(double d) { in signum() method in FpUtils 164 public static float signum(float f) { in signum() method in FpUtils
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | ChronologyTest.java | 61 (int) Math.signum(chronologyResult), (int) Math.signum(idResult)); in assertComparesAccordingToId()
|