Implementation status: to be implemented

Synopsis

#include <math.h>

double copysign(double x, double y);
float copysignf(float x, float y);
long double copysignl(long double x, long double y);

Description

The functions compute the value with the magnitude of x and the sign of y.

Arguments
x - a number whose magnitude is taken into account.
y - a number whose sign is taken into account.

Return value

These functions return the value with the magnitude of x. The value has the sign of y.

Errors

No errors are defined.

Implementation tasks

  • Implement the functions: copysign(), copysignf() and copysignl().