]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
lib/msun: Avoid FE_INEXACT for x86 log2l/log10l
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 8 Mar 2021 09:39:29 +0000 (09:39 +0000)
committerAlex Richardson <arichardson@FreeBSD.org>
Thu, 22 Apr 2021 09:42:48 +0000 (10:42 +0100)
commitfe173c91b04148eaa12e15eb4aa444350ccaded4
tree5ebbeca20e55d6a6f2be58a60526f8f6a007404c
parentc8f8369856b5fe8f6ca26a1e045903b119b80213
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)
lib/msun/ld128/s_logl.c
lib/msun/ld80/s_logl.c