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 Functionsexp(3M)


NAME

 exp - exponential function

SYNOPSIS

 
cc [ flag ... ] file ... -lm [ library ... ]
#include <math.h>
double exp(double x);

DESCRIPTION

 

The exp() function computes the exponential of x, defined as ex.

RETURN VALUES

 

Upon successful completion, exp() returns the exponential of x.

If the correct value would cause overflow, exp() returns HUGE_VAL and sets errno to ERANGE.

If the correct value would cause underflow to zero, exp() returns 0 and may set errno to ERANGE.

If x is NaN, NaN is returned.

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

ERRORS

 

The exp() function will fail if:

ERANGE
The result overflows.

The exp() function may fail if:

ERANGE
The result underflows.

USAGE

 

An application wishing to check for error situations should set errno to 0 before calling exp(). If errno is non-zero on return, or the return value is NaN an error has occurred.

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe

SEE ALSO

 

isnan(3M), log(3M), matherr(3M), mp(3MP), attributes(5), standards(5)

NOTES

 

Prior to Solaris 2.6, there was a conflict between the pow function in this library and the pow function in the libmp library. This conflict was resolved by prepending mp_ to all functions in the libmp library. See mp(3MP) for details.


SunOS 5.9Go To TopLast Changed 29 Dec 1996

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