log2

This block is part of the math group and was last modified in core v10.4.28.

log2 v10.4.28

Returns the base 2 logarithm of a number

In pins 1
  • number_0 required
    number
Out pins 1
  • Number
    number

Outputs the base-2 logarithm of number_0. Numeric strings and booleans coerce; an unwired or nil pin outputs nil, but a wired non-numeric value counts as 0 and yields -Inf, and a negative input yields NaN. Example: number_0=8 -> 3.

A typical wiring for Log2: the number out pin feeds cast to value.

Studio canvas example for the Log2 block: typical wiring for Log2.

Version history

Introduced in v10.4.28.


Back to math Return to the main group to view all sub-groups Back to number: static methods Return to the group to view all blocks within this group