Content-type: text/html Man page of lgamma

lgamma

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

lgamma, gamma - Compute the logarithm of the gamma function  

LIBRARY

Math Library (libm.a)  

SYNOPSIS

#include <math.h>

double lgamma (double x); float lgammaf (float x);  

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows:

lgamma(): XPG4

gamma(): XPG4

Refer to the standards(5) reference page for more information about industry standards and associated tags.  

DESCRIPTION

The lgamma() and lgammaf() functions return the logarithm of the absolute value of gamma of x, or ln(|G(x)|), where G is the gamma function. The sign of gamma of x is returned in the external integer variable signgam. The x parameter cannot be 0 or a negative integer.

The gamma() function returns the natural log of the gamma function and so is functionally equivalent to lgamma(). Because of this, gamma() is marked TO BE WITHDRAWN in the X/Open Portability Guide, Revision 4 (XPG4).

The following table describes function behavior in response to exceptional arguments:


FunctionExceptional ArgumentRoutine Behavior

lgamma(), lgammaf()|x| = infinityInvalid argument
lgamma(), lgammaf()x = 0, -1, -2, -3,...Invalid argument
lgamma(), lgammaf()x > lgamma_max_floatOverflow

The following table lists boundary values used by these functions:

ValueDataHexadecimal ValueDecimal Value
NameType

lgamma_max_floatS_FLOAT 7BC650F9 2.0594342e36

                
T_FLOAT 7F475ABDC501F55F 1.2812545499066958e305

delim off


 

Index

NAME
LIBRARY
SYNOPSIS
STANDARDS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 02:41:28 GMT, October 02, 2010