diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2025-08-12 17:46:51 -0700 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2025-08-13 11:39:53 -0700 |
| commit | f4941319cba19d7691baa6ec783c84be4d847637 (patch) | |
| tree | 7c3f847059f778ba0d83f527e012cac363c95001 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp | |
| parent | 4db8b64850fe8e8ceda91f287cf0b1d6223e953b (diff) | |
[APFloat] Fix getExactInverse for DoubleAPFloat
Some background: getExactInverse()'s callers expect that
the result is not subnormal.
DoubleAPFloat implemented getExactInverse() by going through
semPPCDoubleDoubleLegacy.
This means that numbers like 0x1p1022 which would have a normal inverse
in semPPCDoubleDouble would not in semPPCDoubleDoubleLegacy.
This commit refactors the logic into a single method on APFloat which
uses getExactLog2Abs() and scalbn() to calculate the inverse without
having to compute a reciprocal and test if it is inexact.
This approach works for both IEEEFloat and DoubleAPFloat.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions
