7.12.6.10 The log2 functions

Synopsis

1

#include <math.h>
double log2(double x);
float log2f(float x);
long double log2l(long double x);

Description

2

The log2 functions compute the base-2 logarithm of x. A domain error occurs if the argument is less than zero. A range error may occur if the argument is zero.

Returns

3

The log2 functions return log2 x.