5.4 gamma(), gamma_r()

The gamma() and gamma_r() functions both compute the logarithm of the gamma function. They are synonyms for lgamma and lgamma_r.

double gamma(double x);
double gamma_r(double x, int *);


Despite their names, these functions compute the logarithm of the gamma function, not the gamma function itself. To compute the gamma function itself, use tgamma().


These functions are deprecated.
Non-ConfidentialPDF file icon PDF versionARM 100073_0607_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.