Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ logb(3M) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ilogb(3M)

matherr(3M)

attributes(5)

logb(3M)

NAME

logb − radix-independent exponent

SYNOPSIS

cc [ flag ... ] file ... −lm [ library ... ]

#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 VALUES

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. 

For exceptional cases, matherr(3M) tabulates the values to be returned as dictated by various Standards. 

ERRORS

The logb() function will fail if:

EDOM The x argument is 0.0. 

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe

SEE ALSO

ilogb(3M), matherr(3M), attributes(5)

SunOS 5.6  —  Last change: 29 Dec 1996

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