Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

logb, logbf, logbl - get exponent part of floating-point number

&pagelevel(4)&pagelevel

Syntax

#include <math.h>

double logb(double x);
C11
float logbf(float x);
long double logbl(long double x); (End)

Description

These functions are identical to the corresponding ilogb()-functions except that they do not return the exponent part of x as int, but as a signed floating-point number.

Return val.

Exponent part of



if successful

 

-HUGE_VAL
-HUGE_VALF
-HUGE_VALL
              

depending on the function type, if x = 0.0.
errno is set to indicate the error.                                                                                

Errors

logb(), logbf() and logbl() will fail if: 

 

EDOM

The value of x is 0.0.

See also

ilogb()math.h.