Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gamma(3M) — sys5 — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought



GAMMA(3M)       DOMAIN/IX Reference Manual (SYS5)       GAMMA(3M)



NAME
     gamma - log gamma function

USAGE
     #include <math.h>

     double gamma (x)
     double x;

     extern int signgam;

DESCRIPTION
    oGamma returns ln(|G(x)|), where G(x) is defined as
                       - -           - -
       -t x-1
     ^e -t-  dt.  The sign of G(x) is returned in the external
      -  -   --               - -
     0
     integer signgam.  The argument x may not be a non-positive
     integer.

EXAMPLE
     The following C program fragment might be used to calculate
     G:

          if ((y = gamma(x)) > LN MAXDOUBLE)
                                 -
               error();
          y = signgam * exp(y);

     where LN MAXDOUBLE is the least value that causes exp(3M) to
             -
     return a range error, and is defined in the <values.h>
     header file.

DIAGNOSTICS
     For non-negative integer arguments HUGE is returned, and
     errno is set to EDOM.  A message indicating SING error is
     -----
     printed on the standard error output.

     If the correct value would overflow, gamma returns HUGE and
     sets errno to ERANGE.
          -----

RELATED INFORMATION
     exp(3M), values(5)













Printed 5/31/85                                           GAMMA-1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026