Compartilhar via


_copysign, _copysignl

Returns one value with the sign of another.

double _copysign( 
   double x,
   double y 
);
long double _copysignl( 
   long double x,
   long double y 
);

Parameters

  • x
    Double-precision or long double-precision, floating-point value to be changed.

  • y
    Double-precision or long double-precision, floating-point value.

Floating-Point Support Routines

Return Value

_copysign returns its double-precision, floating-point argument x with the same sign as its double-precision, floating-point argument y. _copysignl returns its long double-precision, floating-point argument x with the same sign as its long double-precision, floating-point argument y. There is no error return.

Requirements

Routine

Required header

_copysign

<float.h>

_copysignl

<math.h>

For more compatibility information, see Compatibility in the Introduction.

.NET Framework Equivalent

Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.

See Also

Reference

fabs, fabsf

_chgsign, _chgsignl