Skip to content

dos_log2

Dale Fugier edited this page Nov 8, 2023 · 1 revision

Calculates the binary logarithm (base-2) of a number.

Syntax

(dos_log2 number)

Parameters

number

The positive real number for which you want the base-2 logarithm.

Returns

The base-2 logarithm of the number, if successful.

nil on error.

Example

Command: (dos_log2 1)
0
Command: (dos_log2 2)
1
Command: (dos_log2 3)
1.58496
Command: (dos_log2 4)
2
Clone this wiki locally