Skip to content

Returns the base-2 logarithm of x. If x is less than or equal to 0.0E0, the function returns NULL.

func.log2( <x> )
func.log2(65536)
┌──────────────────┐
│ func.log2(65536) │
├──────────────────┤
16
└──────────────────┘
LOG2( <x> )
SELECT LOG2(65536);
┌─────────────┐
│ log2(65536) │
├─────────────┤
16
└─────────────┘