Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for subtract (0.54 sec)

  1. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

      }
    
      public void testIsPowerOfTwo() {
        for (BigInteger x : ALL_BIGINTEGER_CANDIDATES) {
          // Checks for a single bit set.
          boolean expected = x.signum() > 0 & x.and(x.subtract(ONE)).equals(ZERO);
          assertEquals(expected, BigIntegerMath.isPowerOfTwo(x));
        }
      }
    
      public void testLog2ZeroAlwaysThrows() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/DirectExecutorService.java

            } else if (nanos <= 0) {
              return false;
            } else {
              long now = System.nanoTime();
              NANOSECONDS.timedWait(lock, nanos);
              nanos -= System.nanoTime() - now; // subtract the actual time we waited
            }
          }
        }
      }
    
      /**
       * Checks if the executor has been shut down and increments the running task count.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Apr 12 15:07:59 UTC 2025
    - 3.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/BigDecimalMath.java

        }
    
        @Override
        BigDecimal toX(double d, RoundingMode mode) {
          return new BigDecimal(d);
        }
    
        @Override
        BigDecimal minus(BigDecimal a, BigDecimal b) {
          return a.subtract(b);
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 3K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/asm/testdata/riscv64.s

    	VL8RE64V	(X10), V8			// 077485e2
    	VS1RV		V3, (X11)			// a7818502
    	VS2RV		V2, (X11)			// 27818522
    	VS4RV		V4, (X11)			// 27828562
    	VS8RV		V8, (X11)			// 278485e2
    
    	// 31.11.1: Vector Single-Width Integer Add and Subtract
    	VADDVV		V1, V2, V3			// d7812002
    	VADDVV		V1, V2, V0, V3			// d7812000
    	VADDVX		X10, V2, V3			// d7412502
    	VADDVX		X10, V2, V0, V3			// d7412500
    	VADDVI		$15, V2, V3			// d7b12702
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed May 21 14:19:19 UTC 2025
    - 49.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/BigDecimalMath.java

        }
    
        @Override
        BigDecimal toX(double d, RoundingMode mode) {
          return new BigDecimal(d);
        }
    
        @Override
        BigDecimal minus(BigDecimal a, BigDecimal b) {
          return a.subtract(b);
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 3K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/DirectExecutorService.java

            } else if (nanos <= 0) {
              return false;
            } else {
              long now = System.nanoTime();
              NANOSECONDS.timedWait(lock, nanos);
              nanos -= System.nanoTime() - now; // subtract the actual time we waited
            }
          }
        }
      }
    
      /**
       * Checks if the executor has been shut down and increments the running task count.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Apr 12 15:07:59 UTC 2025
    - 3.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/MathTesting.java

                513,
                Double.MAX_EXPONENT - 1,
                Double.MAX_EXPONENT,
                Double.MAX_EXPONENT + 1)) {
          BigInteger x = ONE.shiftLeft(exponent);
          bigValues.add(x, x.add(ONE), x.subtract(ONE));
        }
        bigValues.add(new BigInteger("218838949120258359057546633")); // sqrt(2^175) rounded up and
        // down
        bigValues.add(new BigInteger("218838949120258359057546634"));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 10 19:54:19 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/LongMathTest.java

      }
    
      @AndroidIncompatible // slow
      public void testLessThanBranchFree() {
        for (long x : ALL_LONG_CANDIDATES) {
          for (long y : ALL_LONG_CANDIDATES) {
            BigInteger difference = BigInteger.valueOf(x).subtract(BigInteger.valueOf(y));
            if (fitsInLong(difference)) {
              int expected = (x < y) ? 1 : 0;
              int actual = LongMath.lessThanBranchFree(x, y);
              assertEquals(expected, actual);
            }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java

            .setExpectation(-Double.MAX_VALUE, values())
            .test();
      }
    
      public void testRoundToDouble_minDoubleMinusOne() {
        BigDecimal minDoubleAsBigDecimal = new BigDecimal(-Double.MAX_VALUE).subtract(BigDecimal.ONE);
        new RoundToDoubleTester(minDoubleAsBigDecimal)
            .setExpectation(-Double.MAX_VALUE, DOWN, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN)
            .setExpectation(Double.NEGATIVE_INFINITY, UP, FLOOR)
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/primitives/UnsignedIntegerTest.java

            UnsignedInteger aUnsigned = UnsignedInteger.fromIntBits(a);
            UnsignedInteger bUnsigned = UnsignedInteger.fromIntBits(b);
            int expected =
                force32(aUnsigned.bigIntegerValue().subtract(bUnsigned.bigIntegerValue()).intValue());
            UnsignedInteger unsignedSub = aUnsigned.minus(bUnsigned);
            assertThat(unsignedSub.intValue()).isEqualTo(expected);
          }
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 9.6K bytes
    - Viewed (0)
Back to top