fac.
decimalToFactorial
fn
size_t decimalToFactorial(ulong decimal, ref ubyte[21] fac) @safe pure nothrow @nogcThis function transforms decimal value into a value in the factorial number system stored in fac.
A factorial number is constructed as: fac0 0! + fac1 1! + ... fac20 * 20!
Parameters
decimal | The decimal value to convert into the factorial number system. |
fac | The array to store the factorial number. The array is of size 21 as ulong.max requires 21 digits in the factorial number system. |
Returns
A variable storing the number of digits of the factorial number stored in