Number.Log

Syntax

Number.Log(number as nullable number, optional base as nullable number) as nullable number

About

将数字 number的对数返回指定 base 基数。 如果未 base 指定,则默认值为 Number.E. 如果 number 为 null Number.Log ,则返回 null。

示例 1

获取 2 的基数 10 对数。

用法

Number.Log(2, 10)

输出

0.3010299956639812

示例 2

获取 2 的基数 e 对数。

用法

Number.Log(2)

输出

0.69314718055994529