factorial

Functions
factorial
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Exponential and logarithmic functions

Factorial function. More...

## Functions
AFAPI array | factorial (const array &in)
| C++ Interface for factorial of input. More...
AFAPI af_err | af_factorial (af_array *out, const af_array in)
| C Interface for the factorial. More...

## Detailed Description

Factorial function.

Note
  This function supports real inputs only. Complex inputs are not yet supported.

## Function Documentation

## § af_factorial()

AFAPI af_err af_factorial | ( | af_array * | out,
|  | const af_array | in
| ) |  |

C Interface for the factorial.

Parameters

  [out] | out | will contain the result of factorial of `in`
  [in] | in | is input

Returns
  AF_SUCCESS if the execution completes properly

## § factorial()

AFAPI array af::factorial | ( | const array & | in | ) |

C++ Interface for factorial of input.

Parameters

  [in] | in | is input

Returns
  the factorial function of input