HomeFreeBSD

lib/msun: Avoid FE_INEXACT for x86 log2l/log10l

Description

lib/msun: Avoid FE_INEXACT for x86 log2l/log10l

This fixes tests/lib/msun/logarithm_test after compiling the test with
-fno-builtin (D28577). Adding invln10_lo + invln10_10 results in
FE_INEXACT (for all inputs) and the same for the log2l invln2_lo + invln2_hi.
This patch avoids FE_INEXACT (for exact results such as 0) by defining a
constant and using that.

Reviewed By: dim
Differential Revision: https://reviews.freebsd.org/D28786

(cherry picked from commit 221622ec0c8e184dd1ea7e1f77fb45d2d32cb6e2)

Details

Provenance
arichardsonAuthored on Mar 8 2021, 9:39 AM
Reviewer
dim
Differential Revision
D28786: lib/msun: Avoid FE_INEXACT for x86 log2l/log10l
Parents
rGc8f8369856b5: Allow ssp_test:read to pass more reliably
Branches
Unknown
Tags
Unknown