On this page本页内容
$log10¶New in version 3.2.版本3.2中的新功能。
Calculates the log base 10 of a number and returns the result as a double.计算一个数字的对数基数10,并将结果返回为双精度。
$log10 has the following syntax:语法如下所示:
The <number> expression can be any valid expression as long as it resolves to a non-negative number. <number>表达式可以是任何有效的表达式,只要它解析为非负数。For more information on expressions, see Expressions.有关表达式的详细信息,请参阅表达式。
$log10 is equivalent to 相当于$log: [ <number>, 10 ] expression.$log: [ <number>, 10 ]表达式。
If the argument resolves to a value of 如果参数解析为null or refers to a field that is missing, $log10 returns null. null值或引用缺少的字段,$log10返回null。If the argument resolves to 如果参数解析为NaN, $log10 returns NaN.NaN,$log10返回NaN。
{ $log10: 1 } |
0 |
{ $log10: 10 } |
1 |
{ $log10: 100 } |
2 |
{ $log10: 1000 } |
3 |