跳到主要内容

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

This example shows how to return the natural logarithm of the gamma function.

// How to calculate the natural logarithm of the gamma function.

// Use a function to calculate the natural logarithm of the gamma function value.

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