Skip to main content

GAMMALN_PRECISE

Returns the natural logarithm of the gamma function.

Syntax

expression.GAMMALN_PRECISE(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value for which the natural logarithm of the gamma function will be calculated, a positive number.

Returns

number

Example

Calculate the natural logarithm of a gamma function value with precise accuracy in a spreadsheet.

// How do I find the natural logarithm of a gamma function with greater precision in a spreadsheet?

// Get a more accurate logarithmic result for a gamma function in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let ans = func.GAMMALN_PRECISE(0.5);
worksheet.GetRange("B2").SetValue(ans);