HELPLIB.HLB  —  CRTL  copysign
    Returns x with the same sign as y.

    This function is supported on OpenVMS Integrity servers and
    Alpha only.

    Format

      #include  <math.h>

      double copysign  (double x, double y);

      float copysignf  (float x, float y);

                       (Integrity servers, Alpha)

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

                             (Integrity servers, Alpha)

1  –  Arguments

 x

    A real value.

 y

    A real value.

2  –  Description

    The copysign functions return x with the same sign as y. IEEE 754
    requires copysign(x,NaN), copysignf(x,NaN), and copysignl(x,NaN)
    to return +x or -x.

3  –  Return Value

    x                  The value of x with the same sign as y.
Close Help