Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

log2, log2f, log2l - Logarithmus zur Basis 2

&pagelevel(4)&pagelevel

Definition

#include <math.h>

double log2(double x); (C11)
float log2f(float x); (C11)
long double log2l(long double x); (C11)

Diese Funktionen berechnen den Logarithmus der positiven Gleitkommazahl x zur Basis 2.

Returnwert 

log2(x)

für positive x.

 

-HUGE_VAL
-HUGE_VALF
-HUGE_VALL

abhängig vom Funktionstyp,
falls x kleiner 0 ist; zusätzlich wird errno auf EDOM gesetzt (domain error)
oder
falls x gleich 0 ist; zusätzlich wird errno auf ERANGE gesetzt.

Siehe auch

log, log10, exp, exp2