summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2025-08-12 17:46:51 -0700
committerDavid Majnemer <david.majnemer@gmail.com>2025-08-13 11:39:53 -0700
commitf4941319cba19d7691baa6ec783c84be4d847637 (patch)
tree7c3f847059f778ba0d83f527e012cac363c95001 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent4db8b64850fe8e8ceda91f287cf0b1d6223e953b (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