| |||
| Home > Floating-point Support > The math library, mathlib > Copy sign functions (copysign, copysignf) | |||
These functions replace the sign bit of x with
the sign bit of y.
double copysign(double x, double y); float copysignf(float x, float y);
These functions treat all floating-point numbers as signed (including zeros and NaNs) and do not cause any errors or exceptions.