01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GAMMA ( 3M ) GAMMA ( 3M )<br />

NAME<br />

gamma - log gamma function<br />

SYNOPSIS<br />

#include < math.h ><br />

extern int signgam;<br />

double gamma (x)<br />

double x;<br />

DESCRIPTION<br />

Gamma returns ln( I r( x ) I ), where r( x ) IS defined as<br />

00<br />

Je-t t" -l dt . The sign of r( x ) is returned m the external<br />

0<br />

integer sign gam. The argument x may not be a non-negative<br />

integer.<br />

The following C program fragment might be used to calculate r:<br />

if ((y = gamma(x)) > LOGHUGE)<br />

error( );<br />

y = signgam * exp(y );<br />

where LOGHUGE is the least value that causes exp (3M) to return a<br />

range error.<br />

DIAGNOSTICS<br />

For non-negative integer arguments HUGE is returned, and errno<br />

is set to EDOM. A message indicating DOMAIN error is printed on<br />

the standard error output.<br />

If the correct value would overflow, gamma returns HUGE and<br />

sets errno to ERANGE.<br />

These error-handling procedures may be changed with the function<br />

matherr(3M).<br />

SEE ALSO<br />

exp(3M), matherr(3M).<br />

- 1 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!