You are here : python_3mathmathcopysign

math.copysign() - math

Return a float with the magnitude (absolute value) of x but the sign of
y.  On platforms that support signed zeros, copysign(1.0, -0.0)
returns -1.0.


Syntax

math.copysign(x, y)


Example


Output / Return Value


Limitations


Alternatives / See Also


Reference