/libcore/luni/src/test/java/libcore/java/math/ |
H A D | OldBigDecimalCompareTest.java | 36 assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toString()); 39 assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toString()); 42 assertEquals("incorrect value", "1.238096483923847545735673567457356E+53", aNumber.abs(mc).toString()); 45 assertEquals("incorrect value", "1.238096483923847545735673567457357E+53", aNumber.abs(mc).toString()); 49 aNumber.abs(mc);
|
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | IntrinsicTest.java | 56 Math.abs(1); 57 Math.class.getMethod("abs", int.class).invoke(null, 1); 58 Math.abs(1L); 59 Math.class.getMethod("abs", long.class).invoke(null, 1L); 60 Math.abs(1.0f); 61 Math.class.getMethod("abs", float.class).invoke(null, 1.0f); 62 Math.abs(1.0); 63 Math.class.getMethod("abs", double.class).invoke(null, 1.0); 67 StrictMath.abs(1); 68 StrictMath.class.getMethod("abs", in [all...] |
H A D | OldAndroidMathTest.java | 53 // Test for method double java.lang.Math.abs(double) 55 assertTrue("Incorrect double abs value", 56 (Math.abs(-1908.8976) == 1908.8976)); 57 assertTrue("Incorrect double abs value", 58 (Math.abs(1908.8976) == 1908.8976)); 62 // Test for method float java.lang.Math.abs(float) 63 assertTrue("Incorrect float abs value", 64 (Math.abs(-1908.8976f) == 1908.8976f)); 65 assertTrue("Incorrect float abs value", 66 (Math.abs(1908.897 [all...] |
H A D | OldAndroidStrictMathTest.java | 34 // Test for method double java.lang.StrictMath.abs(double) 36 assertTrue("Incorrect double abs value", 37 (StrictMath.abs(-1908.8976) == 1908.8976)); 38 assertTrue("Incorrect double abs value", 39 (StrictMath.abs(1908.8976) == 1908.8976)); 43 // Test for method float java.lang.StrictMath.abs(float) 44 assertTrue("Incorrect float abs value", 45 (StrictMath.abs(-1908.8976f) == 1908.8976f)); 46 assertTrue("Incorrect float abs value", 47 (StrictMath.abs(1908.897 [all...] |
/libcore/ojluni/src/main/java/java/lang/ |
H A D | StrictMath.java | 451 a = Math.abs(a); 869 * is in the range of {@code -abs(y) < r < +abs(y)}. 895 * is in the range of {@code -abs(y) < r < +abs(y)}. 930 public static int abs(int a) { method in class:StrictMath 931 return Math.abs(a); 947 public static long abs(long a) { method in class:StrictMath 948 return Math.abs(a); 966 public static float abs(floa method in class:StrictMath 985 public static double abs(double a) { method in class:StrictMath [all...] |
H A D | Double.java | 299 d = Math.abs(d); 576 return Math.abs(d) <= DoubleConsts.MAX_VALUE;
|
H A D | Float.java | 284 if (Math.abs(f) < FloatConsts.MIN_NORMAL 490 return Math.abs(f) <= FloatConsts.MAX_VALUE;
|
H A D | Math.java | 673 // - a finite number with abs(a) < exp(2,FloatConsts.SIGNIFICAND_WIDTH-32) < 1/2 722 // - a finite number with abs(a) < exp(2,DoubleConsts.SIGNIFICAND_WIDTH-64) < 1/2 896 long ax = Math.abs(x); 897 long ay = Math.abs(y); 1111 * is in the range of {@code -abs(y) < r < +abs(y)}. 1141 * is needed it can be computed as {@code (floorMod(x, y) + abs(y)) % abs(y)}. 1160 * is in the range of {@code -abs(y) < r < +abs( 1194 public static int abs(int a) { method in class:Math 1211 public static long abs(long a) { method in class:Math 1230 public static float abs(float a) { method in class:Math 1254 public static double abs(double a) { method in class:Math [all...] |
/libcore/ojluni/src/main/java/java/time/ |
H A D | ZoneOffset.java | 134 * The abs maximum seconds. 372 if (Math.abs(minutes) > 59) { 373 throw new DateTimeException("Zone offset minutes not in valid range: abs(value) " + 374 Math.abs(minutes) + " is not in the range 0 to 59"); 376 if (Math.abs(seconds) > 59) { 377 throw new DateTimeException("Zone offset seconds not in valid range: abs(value) " + 378 Math.abs(seconds) + " is not in the range 0 to 59"); 380 if (Math.abs(hours) == 18 && (Math.abs(minutes) > 0 || Math.abs(second [all...] |
/libcore/ojluni/src/test/java/nio/file/attribute/ |
H A D | BasicFileAttributeViewCreationTimeTest.java | 72 if (Math.abs(creationTime.toMillis()-now.toEpochMilli()) > 10000L) { 118 if (Math.abs(creationTime.toMillis()-current.toMillis()) > 1000L)
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | TCKZoneOffset.java | 197 String str = (i < 0 ? "-" : "+") + Math.abs(i); 206 String str = (i < 0 ? "-" : "+") + Integer.toString(Math.abs(i) + 100).substring(1); 218 Integer.toString(Math.abs(i) + 100).substring(1) + 219 Integer.toString(Math.abs(j) + 100).substring(1); 237 Integer.toString(Math.abs(i) + 100).substring(1) + ":" + 238 Integer.toString(Math.abs(j) + 100).substring(1); 258 Integer.toString(Math.abs(i) + 100).substring(1) + 259 Integer.toString(Math.abs(j) + 100).substring(1) + 260 Integer.toString(Math.abs(k) + 100).substring(1); 281 Integer.toString(Math.abs( [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | MathContextTest.java | 73 BigDecimal res = aNumber.abs(mcInt6);
|
H A D | BigIntegerTest.java | 340 * @tests java.math.BigInteger#abs() 344 .abs().equals(aZillion.abs())); 345 assertTrue("Invalid number returned for zero neg", zero.negate().abs() 347 assertTrue("Invalid number returned for zero", zero.abs().equals(zero)); 348 assertTrue("Invalid number returned for two", two.negate().abs() 921 assertTrue("remainder out of range", r.abs().compareTo(i2.abs()) < 0); 922 assertTrue("quotient too small", q.abs().add(one).multiply(i2.abs()) [all...] |
H A D | BigDecimalCompareTest.java | 32 * Methods: abs, compareTo, equals, hashCode, 43 assertEquals("incorrect value", result, aNumber.abs().toString()); 53 assertEquals("incorrect value", result, aNumber.abs().toString()); 67 BigDecimal res = aNumber.abs(mc); 83 BigDecimal res = aNumber.abs(mc);
|
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | StrictMathBenchmark.java | 61 StrictMath.abs(d); 67 StrictMath.abs(f); 73 StrictMath.abs(i); 79 StrictMath.abs(l);
|
H A D | MathBenchmark.java | 37 result = Math.abs(d); 45 result = Math.abs(f); 53 result = Math.abs(i); 61 result = Math.abs(l);
|
/libcore/luni/src/main/java/libcore/icu/ |
H A D | RelativeDateTimeFormatter.java | 117 long duration = Math.abs(now - time); 155 count = Math.abs(dayDistance(icuTimeZone, time, now)); 272 long duration = Math.abs(now - time); 287 int days = Math.abs(DateUtilsBridge.dayDistance(timeCalendar, nowCalendar));
|
/libcore/luni/src/main/java/java/math/ |
H A D | BigDecimal.java | 1104 compRem = remainder.abs().shiftLeftOneBit().compareTo(scaledDivisor.abs()); 1243 // If abs(q) != 1 then the quotient is periodic 1244 if (!q.abs().equals(BigInteger.ONE)) { 1464 compRemDiv = Math.abs(quotAndRem[1].signum()); 1645 int m = Math.abs(n); 1688 public BigDecimal abs() { method in class:BigDecimal 1697 public BigDecimal abs(MathContext mc) { method in class:BigDecimal 1814 return 19; // special case required because abs(MIN_VALUE) == MIN_VALUE 1816 int index = Arrays.binarySearch(MathUtils.LONG_POWERS_OF_TEN, Math.abs(valu [all...] |
H A D | Conversion.java | 76 int resLengthInChars = (int) (val.abs().bitLength() / bitsForRadixDigit + ((sign < 0) ? 1 430 int bitLen = val.abs().bitLength(); 434 long lVal = val.abs().shiftRight(delta).longValue();
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
H A D | FileTime.java | 177 long ax = Math.abs(secs); 444 year = Math.abs(year); 446 append(sb, 1000, Math.abs(year));
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | StrictMathTest.java | 42 * java.lang.StrictMath#abs(double) 45 // Test for method double java.lang.StrictMath.abs(double) 47 assertTrue("Incorrect double abs value", 48 (StrictMath.abs(-1908.8976) == 1908.8976)); 49 assertTrue("Incorrect double abs value", 50 (StrictMath.abs(1908.8976) == 1908.8976)); 54 * java.lang.StrictMath#abs(float) 57 // Test for method float java.lang.StrictMath.abs(float) 58 assertTrue("Incorrect float abs value", 59 (StrictMath.abs( [all...] |
H A D | MathTest.java | 32 * java.lang.Math#abs(double) 35 // Test for method double java.lang.Math.abs(double) 37 assertTrue("Incorrect double abs value", 38 (Math.abs(-1908.8976) == 1908.8976)); 39 assertTrue("Incorrect double abs value", 40 (Math.abs(1908.8976) == 1908.8976)); 44 * java.lang.Math#abs(float) 47 // Test for method float java.lang.Math.abs(float) 48 assertTrue("Incorrect float abs value", 49 (Math.abs( [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | ChoiceFormat.java | 272 double tryLessOrEqual = Math.abs(Math.IEEEremainder(choiceLimits[i], 1.0d)); 273 double tryLess = Math.abs(Math.IEEEremainder(less, 1.0d));
|
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | SocketTimeoutTest.java | 69 Math.abs(((float) timeElapsed / TIMEOUT_MILLIS) - 1)
|
/libcore/ojluni/src/main/java/java/nio/file/ |
H A D | TempFileHelper.java | 59 n = (n == Long.MIN_VALUE) ? 0 : Math.abs(n);
|