Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (a - e) copysignl(3)
NAME
copysignl - Returns x with the sign of y for a long double value
LIBRARY
H-series and J-series Guardian native processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <math.h>
long double copysignl(
long double x,
long double y
);
PARAMETERS
x Specifies a long double value.
y Specifies a long double value.
DESCRIPTION
The copysignl() function is a long double version of the copysign() function; it takes long dou-
ble arguments and returns a long double result.
The copysignl() function clears the sign bit (the most significant bit) of x and ORs in the sign bit
of y. The result is x with the sign of y.
This function is recommended by the IEEE Std 754-1985 for floating-point arithmetic.
The copysignl() function can be called only by native processes.
NOTES
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 (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 floating-point formats. Refer to the Guar-
dian Programmer’s Guide for a discussion of floating-point conversions.
IEEE Std 754-1985 requires that copysignl(x,NaN) = ±x but says nothing else about the sign of a
return value that is a NaN.
RETURN VALUES
The copysignl() function returns x with the sign of y.
ERRORS
No errors can be returned. This function does not set errno.
RELATED INFORMATION
Functions: copysign(3), copysignf(3), floor(3), fp_class(3).
STANDARDS CONFORMANCE
This function conforms to the ISO/IEC 9899:1999 standard.
This function conforms to the IEEE Std 1003.1, 2004 Edition.
527192-018 Hewlett-Packard Company 1−119