powered by
Calculate the double factorial of a number, or its logarithm.
DoubleFactorial(n)DoubleFactorial64(n)LnDoubleFactorial(n)Log2DoubleFactorial(n)LogDoubleFactorial(n)LnDoubleFactorial.int(n)LogDoubleFactorial.int(n)
DoubleFactorial64(n)
LnDoubleFactorial(n)
Log2DoubleFactorial(n)
LogDoubleFactorial(n)
LnDoubleFactorial.int(n)
LogDoubleFactorial.int(n)
Returns the double factorial, n * (n - 2) * (n - 4) * (n - 6) * ...
Vector of integers.
DoubleFactorial64(): Returns the exact double factorial as a 64-bit integer64, for n < 34.
DoubleFactorial64()
integer64
n
LnDoubleFactorial(): Returns the logarithm of the double factorial.
LnDoubleFactorial()
Log2DoubleFactorial(): Returns the logarithm of the double factorial.
Log2DoubleFactorial()
LnDoubleFactorial.int(): Slightly faster, when x is known to be length one and below 50001
LnDoubleFactorial.int()
Martin R. Smith (martin.smith@durham.ac.uk)
Other double factorials: doubleFactorials, logDoubleFactorials
doubleFactorials
logDoubleFactorials
DoubleFactorial (-4:0) # Return 1 if n < 2 DoubleFactorial (2) # 2 DoubleFactorial (5) # 1 * 3 * 5 exp(LnDoubleFactorial.int (8)) # log(2 * 4 * 6 * 8) DoubleFactorial64(31)
Run the code above in your browser using DataLab