lfact

lfact(x)

Compute the logarithmic factorial of x

Examples

julia> lfact(5)
4.787491742782046
julia> lfact(10)
15.104412573075515
julia> lfact(0)
0.0

Common mistake example:

julia> lfact(-5)
ERROR: DomainError with -5:
Cannot calculate the logarithmic factorial for negative values.

In this example, a negative value is provided to the lfact function, which is not defined. The lfact function only works for non-negative integers. Ensure that the input value is within the valid range to avoid such errors.

See Also

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: