mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 23:31:50 +08:00
Summary: Math results are compared with MPFR results by checking if they are within a tolerance level of the MPFR result. The tolerance level is set using additional bits of precision of the fractional part of a floating point value. Hence, the actual value of the tolerance depends on not only the additional bits, but also on the exponent part of the floating point number. Previously, the exponent part was not considered in evaluating the tolerance value. While it was OK for small values less than 1 (hence sinf, cosf, sincosf tests were OK), it breaks for large values which functions like exp and friends produce. This change uses the exponent value also to evaluate the tolerance value. LLVM libc produced results can now be compared with MPFR produced results for large values also. Reviewers: abrachet Differential Revision: https://reviews.llvm.org/D79278
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.