The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

NAME

logb - radix-independent exponent

SYNOPSIS

#include <math.h>

double logb(double x);

DESCRIPTION

The logb() function computes the exponent of x, which is the integral part of logr  | x | , as a signed floating point value, for non-zero x, where r is the radix of the machine's floating-point arithmetic.

RETURN VALUE

Upon successful completion, logb() returns the exponent of x.

If x is 0.0, logb() returns -HUGE_VAL and sets errno to [EDOM].

If x is ±Inf, logb() returns +Inf.

If x is NaN, logb() returns NaN and may set errno to [EDOM].

ERRORS

The logb() function will fail if:

[EDOM]
The x argument is 0.0.

The logb() function may fail if:

[EDOM]
The x argument is NaN.

EXAMPLES

None.

APPLICATION USAGE

None.

FUTURE DIRECTIONS

None.

SEE ALSO

ilogb(), <math.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]