/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 | 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 | 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 | 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 | 333 assertTrue("Wrong positive signum", two.signum() == 1); in test_signum() 334 assertTrue("Wrong zero signum", zero.signum() == 0); in test_signum() 335 assertTrue("Wrong neg zero signum", zero.negate().signum() == 0); in test_signum() 336 assertTrue("Wrong neg signum", two.negate().signum() == -1); in test_signum() 450 assertTrue("a non-neg", a.signum() >= 0); in test_shiftRightI() 456 assertTrue("c non-neg", c.signum() >= 0); in test_shiftRightI() 462 assertTrue("e negative", e.signum() == -1); in test_shiftRightI() 499 assertTrue("a non-neg", a.signum() >= 0); in test_shiftLeftI() 506 assertTrue("c negative", c.signum() == -1); in test_shiftLeftI() 912 .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 | OldAndroidMathTest.java | 441 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in testSignumD() 442 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in testSignumD() 444 .signum(0.0))); in testSignumD() 446 .doubleToLongBits(Math.signum(+0.0))); in testSignumD() 448 .doubleToLongBits(Math.signum(-0.0))); in testSignumD() 450 assertEquals(1.0, Math.signum(253681.2187962), 0D); in testSignumD() 451 assertEquals(-1.0, Math.signum(-125874693.56), 0D); in testSignumD() 452 assertEquals(1.0, Math.signum(1.2587E-308), 0D); in testSignumD() 453 assertEquals(-1.0, Math.signum(-1.2587E-308), 0D); in testSignumD() 455 assertEquals(1.0, Math.signum(Double.MAX_VALUE), 0D); in testSignumD() [all …]
|
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 | LongTest.java | 53 assertEquals(0, Long.signum(0)); 54 assertEquals(1, Long.signum(1)); 55 assertEquals(-1, Long.signum(-1)); 56 assertEquals(1, Long.signum(Long.MAX_VALUE)); 57 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() 1080 if (remainder.signum() == 0) { in divideBigIntegers() 1083 int sign = scaledDividend.signum() * scaledDivisor.signum(); in divideBigIntegers() 1113 int sign = Long.signum( scaledDividend ) * Long.signum( scaledDivisor ); in dividePrimitiveLongs() 1209 if (p.signum() == 0) { in divide() 1222 if (quotAndRem[1].signum() == 0) { in divide() 1240 if (q.signum() < 0) { in divide() [all …]
|
D | BigInteger.java | 86 private int signum; field in BigInteger 269 public BigInteger(int signum, byte[] magnitude) { in BigInteger() argument 273 if (signum < -1 || signum > 1) { in BigInteger() 274 throw new NumberFormatException("Invalid signum: " + signum); in BigInteger() 276 if (signum == 0) { in BigInteger() 284 bigInt.putBigEndian(magnitude, signum < 0); in BigInteger() 446 public int signum() { in signum() method in BigInteger 486 int sign = signum(); in shiftLeft() 501 return (signum() == 0) ? this : BitLevel.shiftLeftOneBit(this); in shiftLeftOneBit() 540 int sign = signum(); in testBit() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | StrictMathTest.java | 1238 assertTrue(Double.isNaN(StrictMath.signum(Double.NaN))); in test_signum_D() 1240 .doubleToLongBits(StrictMath.signum(0.0))); in test_signum_D() 1242 .doubleToLongBits(StrictMath.signum(+0.0))); in test_signum_D() 1244 .doubleToLongBits(StrictMath.signum(-0.0))); in test_signum_D() 1246 assertEquals(1.0, StrictMath.signum(253681.2187962), 0D); in test_signum_D() 1247 assertEquals(-1.0, StrictMath.signum(-125874693.56), 0D); in test_signum_D() 1248 assertEquals(1.0, StrictMath.signum(1.2587E-308), 0D); in test_signum_D() 1249 assertEquals(-1.0, StrictMath.signum(-1.2587E-308), 0D); in test_signum_D() 1251 assertEquals(1.0, StrictMath.signum(Double.MAX_VALUE), 0D); in test_signum_D() 1252 assertEquals(1.0, StrictMath.signum(Double.MIN_VALUE), 0D); in test_signum_D() [all …]
|
D | MathTest.java | 1633 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in test_signum_D() 1634 assertTrue(Double.isNaN(Math.signum(Double.NaN))); in test_signum_D() 1636 .signum(0.0))); in test_signum_D() 1638 .doubleToLongBits(Math.signum(+0.0))); in test_signum_D() 1640 .doubleToLongBits(Math.signum(-0.0))); in test_signum_D() 1642 assertEquals(1.0, Math.signum(253681.2187962), 0D); in test_signum_D() 1643 assertEquals(-1.0, Math.signum(-125874693.56), 0D); in test_signum_D() 1644 assertEquals(1.0, Math.signum(1.2587E-308), 0D); in test_signum_D() 1645 assertEquals(-1.0, Math.signum(-1.2587E-308), 0D); in test_signum_D() 1647 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/luni/src/main/java/java/security/spec/ |
D | EllipticCurve.java | 84 if (this.a.signum() < 0 || this.a.compareTo(p) >= 0) { in EllipticCurve() 87 if (this.b.signum() < 0 || this.b.compareTo(p) >= 0) { in EllipticCurve()
|
D | ECFieldFp.java | 45 if (this.p.signum() != 1) { in ECFieldFp()
|
/libcore/luni/src/main/java/java/lang/ |
D | HexStringParser.java | 206 int expSign = Long.signum(exponent); in checkedAddExponent() 207 if (expSign * Long.signum(offset) > 0 && expSign * Long.signum(result) < 0) { in checkedAddExponent()
|
D | StrictMath.java | 709 public static double signum(double d){ in signum() method in StrictMath 710 return Math.signum(d); in signum() 732 public static float signum(float f){ in signum() method in StrictMath 733 return Math.signum(f); in signum()
|