Everything

log2 / log2f / log2l


Calculates the base-2 logarithm of d.

[Format]

#include <math.h>

double log2(double d);

float log2f(float d);

long double log2l(long double d);

[Parameters]

d Value of which logarithm is to be calculated

[Return values]

Normal: Base-2 logarithm of d

Abnormal: Domain error: Returns not-a-number.

[Remarks]

A domain error occurs if d is a negative value.