lgamma


Description:

public double lgamma (double x0)

Returns the natural logarithm of the absolute value of the Gamma function.

Note:

Remember to link the math library: valac -X -lm ...

The sign of the Gamma function is returned in the external integer Posix.signgam. It is 1 when the Gamma function is positive or zero, -1 when it is negative.

Since using a constant location GLib.signgam is not thread-safe, the functions GLib.Math.lgamma_r etc. have been introduced; they return this sign via an output argument.

For non-positeve integer values of x0, GLib.Math.lgamma returns HUGE_VAL, sets GLib.errno to Posix.ERANGE and raises the zero divide exception.

Parameters:

x0

A numeric value.


Namespace: GLib.Math
Package: glib-2.0