Update double_factorial.cpp

This commit is contained in:
Christian Clauss 2020-04-26 08:41:22 +02:00 committed by GitHub
parent 2aaba721fb
commit c4f3f915f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,9 @@
#include <iostream>
#include <cassert>
/* Double factorial of a non-negative integer n,
is defined as the product of
all the integers from 1 to n
that have the same parity (odd or even) as n.
It is also called as semifactorial
of a number and is denoted by !! */
/* Double factorial of a non-negative integer n, is defined as the product of
all the integers from 1 to n that have the same parity (odd or even) as n.
It is also called as semifactorial of a number and is denoted by !! */
uint64_t double_factorial_iterative(uint64_t n) {
uint64_t res = 1;