Disable implicit conversion of copysign arguments. (#1970)

In binary_float.cpp, copysign is special cased. All the reference
functions there take double arguments, except for reference_copysign
which takes float. This commit copies that approach to special case
copysign in binary_double.cpp as well: all the reference functions there
take long double arguments, but this commit changes reference_copysignl
to take double. The rationale for this in binary_float applies equally
to binary_double: conversions of NAN are not required to preserve its
sign bit. On architectures where conversion of NAN resets the sign bit,
copysign fp64 would return incorrect reference results.
This commit is contained in:
Harald van Dijk
2024-06-25 17:42:58 +01:00
committed by GitHub
parent e2c7e901b8
commit 80a02cbd48
5 changed files with 50 additions and 29 deletions

View File

@@ -88,8 +88,8 @@ double reference_acosh(double x);
double reference_asinh(double x);
double reference_atanh(double x);
double reference_cbrt(double x);
float reference_copysign(float x, float y);
double reference_copysignd(double x, double y);
float reference_copysignf(float x, float y);
double reference_copysign(double x, double y);
double reference_exp10(double);
double reference_exp2(double x);
double reference_expm1(double x);