HomeFreeBSD

Add a macro nan_mix() and use it to get NaN results that are (bitwise)

Description

Add a macro nan_mix() and use it to get NaN results that are (bitwise)
independent of the precision in most cases. This is mainly to simplify
checking for errors. r176266 did this for e_pow[f].c using a less
refined expression that often didn't work. r176276 fixes an error in
the log message for r176266. The main refinement is to always expand
to long double precision. See old log messages (especially these 2)
and the comment on the macro for more general details.

Specific details:

  • using nan_mix() consistently for the new and old pow*() functions was the only thing needed to make my consistency test for powl() vs pow() pass on amd64.
  • catrig[fl].c already had all the refinements, but open-coded.
  • e_atan2[fl].c, e_fmod[fl].c and s_remquo[fl] only had primitive NaN mixing.
  • e_hypot[fl].c already had a different refined version of r176266. Refine this further. nan_mix() is not directly usable here since we want to clear the sign bit.
  • e_remainder[f].c already had an earlier version of r176266.
  • s_ccosh[f].c,/s_csinh[f].c already had a version equivalent to r176266. Refine this further. nan_mix() is not directly usable here since the expression has to handle some non-NaN cases.
  • s_csqrt.[fl]: the mixing was special and mostly wrong. Partially fix the special version.
  • s_ctanh[f].c already had a version of r176266.

Details

Provenance
bdeAuthored on
Parents
rS336361: Add needed locking for um_flags added in -r335808.
Branches
Unknown
Tags
Unknown