MicrOS
copysignl.c File Reference
#include "../math.h"

Functions

long double copysignl (long double x, long double y)
 Copy sign. More...
 

Function Documentation

◆ copysignl()

long double copysignl ( long double  x,
long double  y 
)

Copy sign.

The copysignl functions produce a value with the magnitude of x and the sign of y. They produce a NaN (with the sign of y) if x is a NaN. On implementations that represent a signed zero but do not treat negative zero consistently in arithmetic operations, the copysign functions regard the sign of zero as positive.

Parameters
xValue with the magnitude of the resulting value.
yValue with the sign of the resulting value.
Returns
The copysignl functions return a value with the magnitude of x and the sign of y.