Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testFactorialNegative (0.06 sec)

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

        assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1)).isPositiveInfinity();
        assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20)).isPositiveInfinity();
      }
    
      public void testFactorialNegative() {
        for (int n : NEGATIVE_INTEGER_CANDIDATES) {
          assertThrows(IllegalArgumentException.class, () -> DoubleMath.factorial(n));
        }
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Oct 30 14:15:36 UTC 2025
    - 27.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          assertEquals(expected, BigIntegerMath.factorial(i));
        }
      }
    
      public void testFactorial0() {
        assertEquals(BigInteger.ONE, BigIntegerMath.factorial(0));
      }
    
      public void testFactorialNegative() {
        assertThrows(IllegalArgumentException.class, () -> BigIntegerMath.factorial(-1));
      }
    
      public void testBinomialSmall() {
        runBinomialTest(0, 30);
      }
    
      @GwtIncompatible // too slow
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Wed Nov 19 01:35:24 UTC 2025
    - 27.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/DoubleMathTest.java

        assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1)).isPositiveInfinity();
        assertThat(DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20)).isPositiveInfinity();
      }
    
      public void testFactorialNegative() {
        for (int n : NEGATIVE_INTEGER_CANDIDATES) {
          assertThrows(IllegalArgumentException.class, () -> DoubleMath.factorial(n));
        }
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Oct 30 14:15:36 UTC 2025
    - 27.3K bytes
    - Viewed (0)
Back to top