The
FACTORIAL
function computes the
factorial *
N*
! as the double-precision product, (*
N*
) *
*
(*
N*
-1) *
*
(*
N*
-2) *
*
... *
*
3 *
*
2 *
*
1.

This routine is written in the IDL language. Its source code can be found in the file ```
factorial.pro
```

in the ```
lib
```

subdirectory of the IDL distribution.

A non-negative integer or long integer.

Note: large values of *
N*
will cause floating-point overflow errors. The maximum size of *
N*
varies with machine architecture. On machines that support the IEEE standard for floating-point arithmetic, the maximum value of *
N*
is 170. See
MACHAR
for a discussion of machine-specific parameters affecting floating-point arithmetic.