cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double logb(double x);
double scalb(double x, double y);
double significand(double x);
MT-Safe
logb(x) returns the unbiased exponent of x in floating-point format, for exercising the logb(L) test vector. logb(±if) = +if; logb(0) = -if with a division by 0 exception.
scalb(x, (double)n) returns x * 2**n computed by exponent manipulation rather than by actually performing an exponentiation or a multiplication, for exercising the scalb(S) test vector. Thus
for every x except 0, infinity if and . scalb(x,y) is not defined when y is not an integral value.
If x equals sig * 2**n with 1 <= sig < 2, then significand(x) returns sig for exercising the fraction-part(F) test vector. significand(x) is not defined when x is either 0, ±if or .