Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Mathematical Library Functionslogb(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 TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

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


SunOS 5.9Go To TopLast Changed 29 Dec 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.