Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

expm1(3) Guardian Native C Library Calls Reference Manual
NAME
expm1 - Computes the exponential function minus 1.0
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <math.h>
double expm1(
double x);
PARAMETERS
x Is the power to which the base of the natural logarithms (e)istoberaised.
DESCRIPTION
The expm1() function computes the value of e raised to the power x and subtracts 1.0 to get the
nal result.
NOTES
The expm1() function can be called only by native processes.
This function supports both IEEE Std 754-1985 oating-point and Tandem oating-point values.
IEEE values can include NaN and innity,and the sign of 0 (zero) can be either positive or nega-
tive. Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between oating-point formats. Refer to the Guar-
dian Programmers Guide for a discussion of oating-point conversions.
RETURN VALUES
For IEEE oating-point values, when the value of x is NaN, the expm1() function returns NaN.
When x is positive innity, the expm1() function returns positive innity. When x is negative
innity, the expm1() function returns -1.0.
When the calculated value would cause overow, the expm1() function returns HUGE_VAL
and sets errno to [ERANGE].
ERRORS
If any of the following conditions occurs, the expm1() function sets errno to the corresponding
value:
[ERANGE] The calculated result would cause overow.
RELATED INFORMATION
Functions: exp(3), fp_class(3), isnan(3).
STANDARDS CONFORMANCE
The XPG4 Version 2 specication leaves some features to the implementing vendor to dene.
The following features are affected in the HP implementation:
For IEEE oating-point values, this function does not set errno to [EDOM] if the value
of x is NaN.
182 Hewlett-Packard Company 527192-007