MathF.Log2(Single) 方法

定义

返回指定数字的基数 2 对数。

public:
 static float Log2(float x);
public static float Log2(float x);
static member Log2 : single -> single
Public Shared Function Log2 (x As Single) As Single

参数

x
Single

要找到其对数的数字。

返回

下表中的值之一。

x 参数 返回值
阳性 的 base 2 日志 x,即 log 2x
NegativeInfinity
阴性 NaN
等于 NaNNaN
等于 PositiveInfinityPositiveInfinity

注解

参数 x 指定为基数 10。

此方法调用基础 C 运行时,确切的结果或有效输入范围在不同操作系统或体系结构之间可能有所不同。

适用于