_logb, _logbl
Remonter à float.h - Index
Header File
float.h
Category
Math Routines
Prototype
double _logb(double d);
long double _logbl(long double ld);
Description
Extracts the exponential value of a double-precision floating-point argument. If the argument is denormalized, it is treated as if it were normalized.
_logbl is the long double version; it takes a long double argument and returns a long double result.
Return Value
Returns the unbiased exponent of the value passed in.
Example
#include <math.h>
#include <stdio.h>
int main(void)
{
double result;
double x = 8.6872;
result = _logb(x);
printf("The natural log of %lf is %lf\n", x, result);
return 0;
}
Portability
| POSIX | Win32 | ANSI C | ANSI C++ | |
|---|---|---|---|---|
|
_logb |
+ |
|||
|
_logbl |
+ |