[all-commits] [llvm/llvm-project] 9fdb5e: [APFloat] Properly implement next for DoubleAPFloat

David Majnemer via All-commits all-commits at lists.llvm.org
Fri Aug 1 12:38:48 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fdb5e1fef223c777d9cdf2f6d5eaffb33c59b0d
      https://github.com/llvm/llvm-project/commit/9fdb5e1fef223c777d9cdf2f6d5eaffb33c59b0d
  Author: David Majnemer <david.majnemer at gmail.com>
  Date:   2025-08-01 (Fri, 01 Aug 2025)

  Changed paths:
    M llvm/lib/Support/APFloat.cpp
    M llvm/unittests/ADT/APFloatTest.cpp

  Log Message:
  -----------
  [APFloat] Properly implement next for DoubleAPFloat

Rather than converting to the legacy 106-bit format, perform next() on the
low APFloat. Of course, we need to renormalize the two APFloats if
either of the two constraints are violated:
1. abs(low) <= ulp(high)/2
2. high = rtne(high + low)

Should renormalization be needed, it will increment the high component
and set low to the smallest value which obeys these rules.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list