DFACT 3CW "26 December 2009" "mathcw-1.00"

Table of contents


NAME

dfact - n-double-factorial

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern float dfactf (int n);

extern double dfact (int n);

extern long double dfactl (int n);

extern __float80 dfactw (int n);

extern __float128 dfactq (int n);

extern long_long_double dfactll (int n);

extern decimal_float dfactdf (int n);

extern decimal_double dfactd (int n);

extern decimal_long_double dfactdl (int n);

extern decimal_long_long_double dfactdll (int n);

NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.


DESCRIPTION

Find the value of n!! (n double factorial), equal to the product n * (n - 2) * (n - 4) * ... * (2 or 1), by fast table lookup with minimal additional computation, where n >= 0.

The starting values are (-1)!! = 0!! = 1!! = 1.


RETURN VALUES

Return the value of n double factorial. The result should be correctly rounded in at least the single- and double-precision data formats in decimal and binary. For other formats, and large n, the relative error should be less than five ulps (units in the last place).

ERRORS

If the argument is less than -1, set errno to EDOM and return a quiet NaN.

SEE ALSO

binom(3CW), fact(3CW).