Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ logb(3M) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ilogb(3M)

isinf(3M)

isnan(3M)

scalb(3M)

limits(5)

logb(3M)

NAME

logb() − radix-independent exponent

SYNOPSIS

#include <math.h>

double logb(double x);

DESCRIPTION

The logb() function computes the exponent of x. Formally, the return value is the integral part of log base r of |x| as a signed floating point value, for nonzero x, where r is the radix of the machine’s floating-point arithmetic. 

To use this function, link in the math library by specifying −lm on the compiler or linker command line. 

RETURN VALUE

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

If x is NaN, logb() returns NaN. 

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

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

ERRORS

If logb() fails, errno is set to the following value. 

[EDOM] x is zero. 

SEE ALSO

ilogb(3M), isinf(3M), isnan(3M), scalb(3M), limits(5). 

STANDARDS CONFORMANCE

logb(): SVID3, XPG4.2

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026