MCPcopy Create free account
hub / github.com/davisking/dlib / big_fact

Function big_fact

dlib/test/bigint.cpp:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 typename bint
64 >
65 bint big_fact (unsigned short value)
66 /*!
67 ensures
68 - returns the factorial of value
69 !*/
70 {
71 using namespace relational_operators;
72
73 bint a = 1;
74 int k = 0;
75 for (bint i = 2; i <= value; ++i)
76 {
77 ++k;
78 if (k%10 == 0)
79 print_spinner();
80 a *= i;
81 }
82
83 return a;
84 }
85 }
86
87 template <

Callers

nothing calls this directly

Calls 1

print_spinnerFunction · 0.85

Tested by

no test coverage detected