[llvm] [APFloat] Add APFloat::format (PR #99088)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 12:47:38 PDT 2024
================
@@ -557,6 +559,14 @@ class IEEEFloat final : public APFloatBase {
cmpResult compareAbsoluteValue(const IEEEFloat &) const;
+ /// returns the exponent in the format's radix
+ ExponentType getExponent() const;
+
+ /// returns the significand
+ APInt getSignificand() const;
+
+ /// decompose to an integer and exponent to radix 2
+ bool decomposeToIntegerAndPowerOf2(APInt &, int &) const;
----------------
tschuett wrote:
Maybe it is a limitation of APFloat, but this should return `std::optional<APInt, int>`.
https://github.com/llvm/llvm-project/pull/99088
More information about the llvm-commits
mailing list