log2 (Function)

Signature: log2(x: float) -> float

Description: The base-2 logarithm. Total: zero yields negative infinity, a negative argument NaN.

Parameters

  • x (float): The float to take the logarithm of

Returns: float

Example

print(log2(8.0))  // 3.0
print (log2 8.0)  // 3.0