Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
log1pf(3) Guardian Native C Library Calls Reference Manual
NAME
log1pf - Computes the natural logarithm function of 1.0 plus x for a float value
LIBRARY
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
SYNOPSIS
#include <math.h>
float log1pf(
float x);
PARAMETERS
x Is the float value for which the natural logarithm is to be calculated.
DESCRIPTION
The log1pf() function is a float version of the log1p() function; it takes a float argument and
returns a float result.
The log1pf() function returns the natural logarithm of (1.0 + x). The value of the x parameter
must be greater than -1.0.
NOTES
The log1pf() function can be called only by native processes.
This function supports both IEEE Std 754-1985 floating-point and Tandem floating-point values.
IEEE values can include NaN and infinity, and the sign of 0.0 (zero) can be either positive or
negative. Refer to the fp_class(3) reference page for a description of IEEE value classes.
Guardian functions are available to convert between floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
RETURN VALUES
The log1pf() function returns the natural logarithm of (1.0 + x).
When the value of x is -1.0, log1pf() returns -HUGE_VALF and sets errno to [ERANGE].
For IEEE floating-point values, if the value of x is NaN, NaN is returned. When the value of x is
less than -1.0, log1pf() returns NaN and sets errno to [EDOM]. When the value of x is positive
infinity, log1pf() returns positive infinity.
For Tandem floating-point values, when the value of x is less than -1.0, log1pf() returns -
HUGE_VALF and sets errno to [EDOM].
ERRORS
If any of the following conditions occur, the log1pf() function sets errno to the corresponding
value:
[EDOM] The value of the x parameter is less than -1.0.
[ERANGE] The value of the x parameter is -1.0.
RELATED INFORMATION
Functions: fp_class(3), isnan(3), log1p(3), log1p1(3).
4−50 Hewlett-Packard Company 527192-018