# factorial(n)

``````..  factorial(n)

Factorial of ``n``.  If ``n`` is an :obj:`Integer`, the factorial
is computed as an integer (promoted to at least 64 bits).  Note
that this may overflow if ``n`` is not small, but you can use
``factorial(big(n))`` to compute the result exactly in arbitrary
precision.  If ``n`` is not an ``Integer``, ``factorial(n)`` is
equivalent to :func:`gamma(n+1) <gamma>`.``````

## Examples

``````julia> factorial(4)
24``````
``````julia> factorial(3)
6
julia> factorial(2)
2
julia> factorial(3,2)
3``````

The `factorial(n, k)` function in Julia computes the ratio of factorials, `(factorial(n) / factorial(k))`.

Here are some examples of how to use the `factorial(n, k)` function:

1. Compute the ratio of factorials:

``````julia> factorial(6, 3)
120.0``````

This example calculates the ratio `(factorial(6) / factorial(3))`, which equals `120.0`.

2. Calculate the ratio for larger values:

``````julia> factorial(10, 5)
30240.0``````

It computes the ratio `(factorial(10) / factorial(5))`, resulting in `30240.0`.

3. Handle edge cases:

``````julia> factorial(0, 0)
1.0``````

In this case, both `n` and `k` are zero, so the ratio is `1.0`.

``````julia> factorial(5, 10)
0.0``````

Here, `k` is greater than `n`, so the ratio is `0.0`.

Please note that the `factorial(n, k)` function returns a floating-point value.

Remember to provide valid inputs and ensure that `k <= n` to avoid errors and obtain meaningful results.