Add factorial and gamma functions