- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for testFactorial (0.12 sec)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} } } public void testFactorial() { BigInteger expected = BigInteger.ONE; for (int i = 1; i <= 200; i++) { expected = expected.multiply(BigInteger.valueOf(i)); assertEquals(expected, BigIntegerMath.factorial(i)); } } public void testFactorial0() { assertEquals(BigInteger.ONE, BigIntegerMath.factorial(0)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
for (double d : Arrays.asList(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NaN)) { assertFalse(DoubleMath.isMathematicalInteger(d)); } } @GwtIncompatible // Math.ulp public void testFactorial() { for (int i = 0; i <= DoubleMath.MAX_FACTORIAL; i++) { double actual = BigIntegerMath.factorial(i).doubleValue(); double result = DoubleMath.factorial(i);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
if (expected != actual) { fail("Expected for " + a + " " + op + " " + b + " = " + expected + ", but got " + actual); } } // Depends on the correctness of BigIntegerMath.factorial. public void testFactorial() { for (int n = 0; n <= 50; n++) { BigInteger expectedBig = BigIntegerMath.factorial(n); int expectedInt = fitsInInt(expectedBig) ? expectedBig.intValue() : Integer.MAX_VALUE;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
fail("Expected for " + a + " " + op + " " + b + " = " + expected + ", but got " + actual); } } // Depends on the correctness of BigIntegerMath.factorial. @GwtIncompatible // TODO public void testFactorial() { for (int n = 0; n <= 50; n++) { BigInteger expectedBig = BigIntegerMath.factorial(n); long expectedLong = fitsInLong(expectedBig) ? expectedBig.longValue() : Long.MAX_VALUE;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 31.4K bytes - Viewed (0)