/external/guava/guava-tests/benchmark/com/google/common/math/ |
D | IntMathBenchmark.java | 37 private static int[] factorial = new int[ARRAY_SIZE]; field in IntMathBenchmark 47 factorial[i] = RANDOM_SOURCE.nextInt(50); in setUp() 48 binomial[i] = RANDOM_SOURCE.nextInt(factorial[i] + 1); in setUp() 82 @Benchmark int factorial(int reps) { in factorial() method in IntMathBenchmark 86 tmp += IntMath.factorial(factorial[j]); in factorial() 95 tmp += IntMath.binomial(factorial[j], binomial[j]); in binomial()
|
D | BigIntegerMathBenchmark.java | 60 return BigInteger.valueOf(LongMath.factorial(n)); in oldSlowFactorial() 63 return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n)); in oldSlowFactorial() 98 @Benchmark int factorial(int reps) { in factorial() method in BigIntegerMathBenchmark 102 tmp += BigIntegerMath.factorial(factorials[j]).intValue(); in factorial()
|
D | DoubleMathBenchmark.java | 56 @Benchmark long factorial(int reps) { in factorial() method in DoubleMathBenchmark 60 tmp += Double.doubleToRawLongBits(DoubleMath.factorial(factorials[j])); in factorial()
|
D | LongMathBenchmark.java | 85 @Benchmark int factorial(int reps) { in factorial() method in LongMathBenchmark 89 tmp += LongMath.factorial(factorialArguments[j]); in factorial()
|
D | ApacheBenchmark.java | 44 return DoubleMath.factorial(n); in factorialDouble()
|
/external/clang/test/Analysis/ |
D | inline.c | 37 unsigned factorial(unsigned x) { in factorial() function 40 return x * factorial(x - 1); in factorial() 44 if (factorial(3) == 6) { in test_factorial() 55 unsigned x = factorial(3); in test_factorial_2() 56 if (x == factorial(3)) { in test_factorial_2()
|
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/ |
D | BigIntegerMathTest.java | 154 assertEquals(expected, BigIntegerMath.factorial(i)); in testFactorial() 159 assertEquals(BigInteger.ONE, BigIntegerMath.factorial(0)); in testFactorial0() 164 BigIntegerMath.factorial(-1); in testFactorialNegative() 178 .factorial(n) in runBinomialTest() 179 .divide(BigIntegerMath.factorial(k)) in runBinomialTest() 180 .divide(BigIntegerMath.factorial(n - k)); in runBinomialTest()
|
D | IntMathTest.java | 298 BigInteger expectedBig = BigIntegerMath.factorial(n); in testFactorial() 300 assertEquals(expectedInt, IntMath.factorial(n)); in testFactorial() 307 IntMath.factorial(n); in testFactorialNegative()
|
/external/vixl/examples/ |
D | factorial.cc | 65 Label factorial; in main() local 66 masm.Bind(&factorial); in main() 73 simulator.RunFrom(masm.GetLabelAddress<Instruction*>(&factorial)); in main()
|
/external/v8/test/mjsunit/ |
D | sin-cos.js | 71 var factorial = [1]; variable 74 factorial[i] = factorial[i-1] * i; 92 terms.push(sign * x / factorial[i]); 105 terms.push(sign * x / factorial[i]);
|
/external/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ |
D | next_permutation.pass.cpp | 25 int factorial(int x) in factorial() function 57 assert(count == factorial(e)); in test()
|
D | prev_permutation.pass.cpp | 25 int factorial(int x) in factorial() function 57 assert(count == factorial(e)); in test()
|
D | next_permutation_comp.pass.cpp | 26 int factorial(int x) in factorial() function 59 assert(count == factorial(e)); in test()
|
D | prev_permutation_comp.pass.cpp | 26 int factorial(int x) in factorial() function 59 assert(count == factorial(e)); in test()
|
/external/guava/guava-tests/test/com/google/common/math/ |
D | DoubleMathTest.java | 69 assertTrue(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL).compareTo(maxDoubleValue) <= 0); in testConstantsMaxFactorial() 71 BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1).compareTo(maxDoubleValue) > 0); in testConstantsMaxFactorial() 77 BigIntegerMath.factorial(n).doubleValue(), DoubleMath.everySixteenthFactorial[i]); in testConstantsEverySixteenthFactorial() 457 double actual = BigIntegerMath.factorial(i).doubleValue(); 458 double result = DoubleMath.factorial(i); 464 assertEquals(Double.POSITIVE_INFINITY, DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1)); 465 assertEquals(Double.POSITIVE_INFINITY, DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20)); 471 DoubleMath.factorial(n);
|
D | BigIntegerMathTest.java | 410 assertEquals(expected, BigIntegerMath.factorial(i)); 415 assertEquals(BigInteger.ONE, BigIntegerMath.factorial(0)); 420 BigIntegerMath.factorial(-1); 439 .factorial(n) 440 .divide(BigIntegerMath.factorial(k)) 441 .divide(BigIntegerMath.factorial(n - k));
|
D | IntMathTest.java | 465 BigInteger expectedBig = BigIntegerMath.factorial(n); in testFactorial() 467 assertEquals(expectedInt, IntMath.factorial(n)); in testFactorial() 474 IntMath.factorial(n); in testFactorialNegative()
|
D | LongMathTest.java | 543 BigInteger expectedBig = BigIntegerMath.factorial(n); in testFactorial() 545 assertEquals(expectedLong, LongMath.factorial(n)); in testFactorial() 553 LongMath.factorial(n); in testFactorialNegative()
|
/external/jemalloc/test/unit/ |
D | math.c | 24 factorial(unsigned x) in factorial() function 42 (double)factorial(x-1), MAX_REL_ERR, MAX_ABS_ERR), in TEST_BEGIN()
|
/external/vixl/test/examples/ |
D | test-examples.cc | 201 TEST_FUNCTION(factorial); \ 205 TEST(factorial) { in TEST() argument 208 Label factorial; in TEST() local 209 masm.Bind(&factorial); in TEST()
|
/external/clang/test/CodeGenCXX/ |
D | const-init-cxx11.cpp | 274 constexpr int factorial(int n) { in factorial() function 275 return n ? factorial(n-1) * n : 1; in factorial() 280 constexpr NonTrivialDtor() : n(factorial(5)), p(&n) {} in NonTrivialDtor()
|
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/ |
D | DoubleMath.java | 79 public static double factorial(int n) { in factorial() method in DoubleMath
|
D | IntMath.java | 376 public static int factorial(int n) {
|
D | BigIntegerMath.java | 133 public static BigInteger factorial(int n) { in factorial() method in BigIntegerMath
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/ |
D | MathUtils.java | 794 public static long factorial(final int n) { 834 return factorial(n); 859 return FastMath.log(factorial(n));
|