Namespaces
Variants

std::copysign, std::copysignf, std::copysignl

From cppreference.com
 
 
 
Common mathematical functions
Functions
Basic operations
(C++11)    
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Exponential functions
(C++11)
(C++11)

(C++11)
(C++11)
Power functions
(C++11)
(C++11)
Trigonometric and
hyperbolic functions
(C++11)
(C++11)
(C++11)

Error and gamma functions
(C++11)
(C++11)
(C++11)
(C++11)
Nearest integer floating point operations
(C++11)(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
Floating point manipulation functions
(C++11)(C++11)
(C++11)
(C++11)
(C++11)(C++11)
(C++26)(C++26)
(C++11)
Classification and comparison
(C++11)    
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
Types
(C++11)
(C++11)
(C++11)
Macro constants
(C++11)
(C++11)
(C++26)(C++26)(C++26)

 
Defined in header <cmath>
float       copysign ( float mag, float sgn );
double      copysign ( double mag, double sgn );
long double copysign ( long double mag, long double sgn );
(1) (until C++23)
constexpr /*floating-point-type*/
            copysign ( /*floating-point-type*/ mag,
                       /*floating-point-type*/ sgn );
(since C++23)
float       copysignf( float mag, float sgn );
(2) (since C++11)
(constexpr since C++23)
long double copysignl( long double mag, long double sgn );
(3) (since C++11)
(constexpr since C++23)
SIMD overload (since C++26)