[all-commits] [llvm/llvm-project] 2cb473: [libc] adjust strtofloat precision for subnormals

michaelrj-google via All-commits all-commits at lists.llvm.org
Tue Jul 11 11:27:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cb4731902d1f05af11154afe19f6fb2331c1920
      https://github.com/llvm/llvm-project/commit/2cb4731902d1f05af11154afe19f6fb2331c1920
  Author: Michael Jones <michaelrj at google.com>
  Date:   2023-07-11 (Tue, 11 Jul 2023)

  Changed paths:
    M libc/fuzzing/stdlib/strtofloat_fuzz.cpp

  Log Message:
  -----------
  [libc] adjust strtofloat precision for subnormals

Subnormal floating point numbers have a lower effective precision than
normal floating point numbers. This can cause issues for the fuzz test
since the MPFR floats have a constant precision regardless of the
exponent, and the precision must match exactly or else create rounding
errors. To solve this problem, the precision of the MPFR floats is
dynamically calculated.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D154909




More information about the All-commits mailing list