Factorial function of a real number of complex number

factorial only accepts integers currently. I don’t know if it allowed real or complex types in the past.

Presumably you want a gamma function? You can access it from SpecialFunctions.jl

using Pkg
Pkg.add("SpecialFunctions")
using SpecialFunctions
x = 4
gamma(x+1) == factorial(x)  # true
x=0.0 + 0.12008239133631671im
gamma(x+1)

gives 0.9859392250075061 - 0.06776624698996092im.

2 Likes