Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

lgammaf(3) Guardian Native C Library Calls Reference Manual
NAME
lgammaf - Computes the logarithm of the gamma function for a float value
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
float lgammaf(
float x);
extern int signgam;
PARAMETERS
x Species a positive float value.
DESCRIPTION
The lgammaf() function is a float version of the lgamma() function; it takes a float argument
and returns a float result.
The lgammaf() function returns the logarithm of the absolute value of the gamma of x, where the
gamma of x is defined as:
0
e
t
t
x1
dt
The sign of the gamma of x is stored in the external integer variable signgam. The x parameter
cannot be a nonpositive integer. The gamma of x is defined over the real numbers, except for the
nonpositive integers.
NOTES
Do not use the expression
g = signgam * exp (lgammaf (x))
to compute
g = lgammaf (x)
Instead, use the following sequence:
lg = lgammaf (x);
g = signgam * exp (lg);
This is because the C language does not specify evaluation order, and signgam is modified by
the call to the lgammaf() function.
The names lgamma() and gamma() are different names for the same function. The gamma()
function is provided for compatibility with older versions of UNIX. The lgamma(), lgammaf(),
and lgammal() functions should be used instead.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values
in the native environment. IEEE values can include NaN and infinity, and the sign of 0.0 (zero)
can be either positive or negative. Refer to the fp_class(3) reference page for a description of
IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
424 Hewlett-Packard Company 527192-018