Evaluate to X, where the absolute value of X
equals the absolute value of Expr1 and the sign of X
matches the sign of Expr2. This function is based on
copysign() from C99, which works on double precision floats and deals
with handling the sign of special floating point values such as -0.0.
Our implementation follows C99 if both arguments are floats. Otherwise, copysign/2
evaluates to Expr1 if the sign of both expressions matches or
-Expr1 if the signs do not match. Here, we use the extended
notion of signs for floating point numbers, where the sign of -0.0 and
other special floats is negative.
Tag confusing pages with doc-needs-help|Tags are associated to your profile if you are logged in