MicrOS
logb.c File Reference
#include "../math.h"

Functions

double logb (double x)
 Compute logarithm using FLT_RADIX. More...
 

Function Documentation

◆ logb()

double logb ( double  x)

Compute logarithm using FLT_RADIX.

The logb functions extract the exponent of x, as a signed integer value in floating-point format. If x is subnormal it is treated as though it were normalized; thus, for positive finite x, 1 ≤ x × FLT_RADIX^(−log_b(x)) < FLT_RADIX. A domain error or pole error may occur if the argument is zero.

Parameters
xValue whose logarithm is calculated.
Returns
The logb functions return the signed exponent of x.