Home
last modified time | relevance | path

Searched refs:factorial (Results 1 – 25 of 73) sorted by relevance

123

/external/guava/guava-tests/benchmark/com/google/common/math/
DIntMathBenchmark.java37 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()
DBigIntegerMathBenchmark.java60 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()
DDoubleMathBenchmark.java56 @Benchmark long factorial(int reps) { in factorial() method in DoubleMathBenchmark
60 tmp += Double.doubleToRawLongBits(DoubleMath.factorial(factorials[j])); in factorial()
DLongMathBenchmark.java85 @Benchmark int factorial(int reps) { in factorial() method in LongMathBenchmark
89 tmp += LongMath.factorial(factorialArguments[j]); in factorial()
/external/catch2/docs/
Dslow-compiles.md28factorial.cpp` (with forward declaration in `factorial.h`) and want to test it and keep the compil…
37 // tests-factorial.cpp
40 #include "factorial.h"
42 TEST_CASE( "Factorials are computed", "[factorial]" ) {
50 …o link it with separately compiled `tests-factorial.cpp`. This means that adding more tests to `te…
54 $ g++ tests-main.o tests-factorial.cpp -o tests && ./tests -r compact
58 Now, the next time we change the file `tests-factorial.cpp` (say we add `REQUIRE( Factorial(0) == 1…
61 $ g++ tests-main.o tests-factorial.cpp -o tests && ./tests -r compact
62 tests-factorial.cpp:11: failed: Factorial(0) == 1 for: 0 == 1
/external/clang/test/Analysis/
Dinline.c37 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/python/cpython3/Modules/_decimal/tests/
Dbench.py60 def factorial(n, m): function
62 return factorial(m, n)
68 return factorial(n, (n+m)//2) * factorial((n+m)//2 + 1, m)
110 x = factorial(C.Decimal(n), 0)
121 y = factorial(n, 0)
/external/python/cpython3/Lib/test/
Dprofilee.py33 factorial(14) # 130
35 def factorial(n): function
43 return mul(n, factorial(n-1))
86 factorial(3) # 20
/external/python/cpython2/Lib/test/
Dprofilee.py33 factorial(14) # 130
35 def factorial(n): function
43 return mul(n, factorial(n-1))
86 factorial(3) # 20
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DBigIntegerMathTest.java154 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()
DIntMathTest.java298 BigInteger expectedBig = BigIntegerMath.factorial(n); in testFactorial()
300 assertEquals(expectedInt, IntMath.factorial(n)); in testFactorial()
307 IntMath.factorial(n); in testFactorialNegative()
/external/vixl/examples/aarch64/
Dfactorial.cc62 Label factorial; in main() local
63 masm.Bind(&factorial); in main()
70 simulator.RunFrom(masm.GetLabelAddress<Instruction*>(&factorial)); in main()
/external/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/
Dnext_permutation.pass.cpp25 int factorial(int x) in factorial() function
57 assert(count == factorial(e)); in test()
Dprev_permutation.pass.cpp25 int factorial(int x) in factorial() function
57 assert(count == factorial(e)); in test()
Dnext_permutation_comp.pass.cpp26 int factorial(int x) in factorial() function
59 assert(count == factorial(e)); in test()
Dprev_permutation_comp.pass.cpp26 int factorial(int x) in factorial() function
59 assert(count == factorial(e)); in test()
/external/guava/guava-tests/test/com/google/common/math/
DDoubleMathTest.java70 assertTrue(BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL).compareTo(maxDoubleValue) <= 0); in testConstantsMaxFactorial()
72 BigIntegerMath.factorial(DoubleMath.MAX_FACTORIAL + 1).compareTo(maxDoubleValue) > 0); in testConstantsMaxFactorial()
78 BigIntegerMath.factorial(n).doubleValue(), DoubleMath.everySixteenthFactorial[i]); in testConstantsEverySixteenthFactorial()
516 double actual = BigIntegerMath.factorial(i).doubleValue();
517 double result = DoubleMath.factorial(i);
523 assertEquals(Double.POSITIVE_INFINITY, DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 1));
524 assertEquals(Double.POSITIVE_INFINITY, DoubleMath.factorial(DoubleMath.MAX_FACTORIAL + 20));
530 DoubleMath.factorial(n);
DBigIntegerMathTest.java410 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));
/external/deqp/external/vulkancts/modules/vulkan/pipeline/
DvktPipelineCombinationsIterator.hpp51 static deUint32 factorial (deUint32 x);
128 deUint32 CombinationsIterator<T>::factorial (deUint32 x) in factorial() function in vkt::pipeline::CombinationsIterator
/external/python/cpython3/Doc/library/
Dasyncio-task.rst337 async def factorial(name, number):
340 print(f"Task {name}: Compute factorial({i})...")
343 print(f"Task {name}: factorial({number}) = {f}")
348 factorial("A", 2),
349 factorial("B", 3),
350 factorial("C", 4),
357 # Task A: Compute factorial(2)...
358 # Task B: Compute factorial(2)...
359 # Task C: Compute factorial(2)...
360 # Task A: factorial(2) = 2
[all …]
/external/jemalloc/test/unit/
Dmath.c28 factorial(unsigned x) in factorial() function
46 (double)factorial(x-1), MAX_REL_ERR, MAX_ABS_ERR), in TEST_BEGIN()
/external/jemalloc_new/test/unit/
Dmath.c28 factorial(unsigned x) { in factorial() function
45 (double)factorial(x-1), MAX_REL_ERR, MAX_ABS_ERR), in TEST_BEGIN()
/external/junit-params/
DRELEASES.md149 @TestCaseName("factorial({0}) = {1}")
156 factorial(1) = 1
157 factorial(2) = 2
/external/apache-commons-bcel/src/examples/Mini/
Dfac.mini1 -- Compute factorial
/external/vixl/test/aarch64/examples/
Dtest-examples.cc198 TEST_FUNCTION(factorial); \
202 TEST(factorial) { in TEST() argument
205 Label factorial; in TEST() local
206 masm.Bind(&factorial); in TEST()

123