#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cstring>
#include <limits.h>
#define APFLOAT_DISPATCH_ON_SEMANTICS …
usingnamespacellvm;
#define PackCategoriesIntoKey(_lhs, _rhs) …
static_assert …;
namespace llvm {
enum class fltNonfiniteBehavior { … };
enum class fltNanEncoding { … };
struct fltSemantics { … };
static constexpr fltSemantics semIEEEhalf = …;
static constexpr fltSemantics semBFloat = …;
static constexpr fltSemantics semIEEEsingle = …;
static constexpr fltSemantics semIEEEdouble = …;
static constexpr fltSemantics semIEEEquad = …;
static constexpr fltSemantics semFloat8E5M2 = …;
static constexpr fltSemantics semFloat8E5M2FNUZ = …;
static constexpr fltSemantics semFloat8E4M3 = …;
static constexpr fltSemantics semFloat8E4M3FN = …;
static constexpr fltSemantics semFloat8E4M3FNUZ = …;
static constexpr fltSemantics semFloat8E4M3B11FNUZ = …;
static constexpr fltSemantics semFloat8E3M4 = …;
static constexpr fltSemantics semFloatTF32 = …;
static constexpr fltSemantics semFloat8E8M0FNU = …;
static constexpr fltSemantics semFloat6E3M2FN = …;
static constexpr fltSemantics semFloat6E2M3FN = …;
static constexpr fltSemantics semFloat4E2M1FN = …;
static constexpr fltSemantics semX87DoubleExtended = …;
static constexpr fltSemantics semBogus = …;
static constexpr fltSemantics semPPCDoubleDouble = …;
static constexpr fltSemantics semPPCDoubleDoubleLegacy = …;
const llvm::fltSemantics &APFloatBase::EnumToSemantics(Semantics S) { … }
APFloatBase::Semantics
APFloatBase::SemanticsToEnum(const llvm::fltSemantics &Sem) { … }
const fltSemantics &APFloatBase::IEEEhalf() { … }
const fltSemantics &APFloatBase::BFloat() { … }
const fltSemantics &APFloatBase::IEEEsingle() { … }
const fltSemantics &APFloatBase::IEEEdouble() { … }
const fltSemantics &APFloatBase::IEEEquad() { … }
const fltSemantics &APFloatBase::PPCDoubleDouble() { … }
const fltSemantics &APFloatBase::Float8E5M2() { … }
const fltSemantics &APFloatBase::Float8E5M2FNUZ() { … }
const fltSemantics &APFloatBase::Float8E4M3() { … }
const fltSemantics &APFloatBase::Float8E4M3FN() { … }
const fltSemantics &APFloatBase::Float8E4M3FNUZ() { … }
const fltSemantics &APFloatBase::Float8E4M3B11FNUZ() { … }
const fltSemantics &APFloatBase::Float8E3M4() { … }
const fltSemantics &APFloatBase::FloatTF32() { … }
const fltSemantics &APFloatBase::Float8E8M0FNU() { … }
const fltSemantics &APFloatBase::Float6E3M2FN() { … }
const fltSemantics &APFloatBase::Float6E2M3FN() { … }
const fltSemantics &APFloatBase::Float4E2M1FN() { … }
const fltSemantics &APFloatBase::x87DoubleExtended() { … }
const fltSemantics &APFloatBase::Bogus() { … }
constexpr RoundingMode APFloatBase::rmNearestTiesToEven;
constexpr RoundingMode APFloatBase::rmTowardPositive;
constexpr RoundingMode APFloatBase::rmTowardNegative;
constexpr RoundingMode APFloatBase::rmTowardZero;
constexpr RoundingMode APFloatBase::rmNearestTiesToAway;
const unsigned int maxExponent = …;
const unsigned int maxPrecision = …;
const unsigned int maxPowerOfFiveExponent = …;
const unsigned int maxPowerOfFiveParts = …;
unsigned int APFloatBase::semanticsPrecision(const fltSemantics &semantics) { … }
APFloatBase::ExponentType
APFloatBase::semanticsMaxExponent(const fltSemantics &semantics) { … }
APFloatBase::ExponentType
APFloatBase::semanticsMinExponent(const fltSemantics &semantics) { … }
unsigned int APFloatBase::semanticsSizeInBits(const fltSemantics &semantics) { … }
unsigned int APFloatBase::semanticsIntSizeInBits(const fltSemantics &semantics,
bool isSigned) { … }
bool APFloatBase::semanticsHasZero(const fltSemantics &semantics) { … }
bool APFloatBase::semanticsHasSignedRepr(const fltSemantics &semantics) { … }
bool APFloatBase::isRepresentableAsNormalIn(const fltSemantics &Src,
const fltSemantics &Dst) { … }
unsigned APFloatBase::getSizeInBits(const fltSemantics &Sem) { … }
static constexpr APFloatBase::ExponentType
exponentZero(const fltSemantics &semantics) { … }
static constexpr APFloatBase::ExponentType
exponentInf(const fltSemantics &semantics) { … }
static constexpr APFloatBase::ExponentType
exponentNaN(const fltSemantics &semantics) { … }
static inline Error createError(const Twine &Err) { … }
static constexpr inline unsigned int partCountForBits(unsigned int bits) { … }
static inline unsigned int
decDigitValue(unsigned int c)
{ … }
static Expected<int> readExponent(StringRef::iterator begin,
StringRef::iterator end) { … }
static Expected<int> totalExponent(StringRef::iterator p,
StringRef::iterator end,
int exponentAdjustment) { … }
static Expected<StringRef::iterator>
skipLeadingZeroesAndAnyDot(StringRef::iterator begin, StringRef::iterator end,
StringRef::iterator *dot) { … }
struct decimalInfo { … };
static Error interpretDecimal(StringRef::iterator begin,
StringRef::iterator end, decimalInfo *D) { … }
static Expected<lostFraction>
trailingHexadecimalFraction(StringRef::iterator p, StringRef::iterator end,
unsigned int digitValue) { … }
static lostFraction
lostFractionThroughTruncation(const APFloatBase::integerPart *parts,
unsigned int partCount,
unsigned int bits)
{ … }
static lostFraction
shiftRight(APFloatBase::integerPart *dst, unsigned int parts, unsigned int bits)
{ … }
static lostFraction
combineLostFractions(lostFraction moreSignificant,
lostFraction lessSignificant)
{ … }
static unsigned int
HUerrBound(bool inexactMultiply, unsigned int HUerr1, unsigned int HUerr2)
{ … }
static APFloatBase::integerPart
ulpsFromBoundary(const APFloatBase::integerPart *parts, unsigned int bits,
bool isNearest) { … }
static unsigned int
powerOf5(APFloatBase::integerPart *dst, unsigned int power) { … }
static const char hexDigitsLower[] = …;
static const char hexDigitsUpper[] = …;
static const char infinityL[] = …;
static const char infinityU[] = …;
static const char NaNL[] = …;
static const char NaNU[] = …;
static unsigned int
partAsHex (char *dst, APFloatBase::integerPart part, unsigned int count,
const char *hexDigitChars)
{ … }
static char *
writeUnsignedDecimal (char *dst, unsigned int n)
{ … }
static char *
writeSignedDecimal (char *dst, int value)
{ … }
namespace detail {
void IEEEFloat::initialize(const fltSemantics *ourSemantics) { … }
void IEEEFloat::freeSignificand() { … }
void IEEEFloat::assign(const IEEEFloat &rhs) { … }
void IEEEFloat::copySignificand(const IEEEFloat &rhs) { … }
void IEEEFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill) { … }
IEEEFloat &IEEEFloat::operator=(const IEEEFloat &rhs) { … }
IEEEFloat &IEEEFloat::operator=(IEEEFloat &&rhs) { … }
bool IEEEFloat::isDenormal() const { … }
bool IEEEFloat::isSmallest() const { … }
bool IEEEFloat::isSmallestNormalized() const { … }
unsigned int IEEEFloat::getNumHighBits() const { … }
bool IEEEFloat::isSignificandAllOnes() const { … }
bool IEEEFloat::isSignificandAllOnesExceptLSB() const { … }
bool IEEEFloat::isSignificandAllZeros() const { … }
bool IEEEFloat::isSignificandAllZerosExceptMSB() const { … }
bool IEEEFloat::isLargest() const { … }
bool IEEEFloat::isInteger() const { … }
bool IEEEFloat::bitwiseIsEqual(const IEEEFloat &rhs) const { … }
IEEEFloat::IEEEFloat(const fltSemantics &ourSemantics, integerPart value) { … }
IEEEFloat::IEEEFloat(const fltSemantics &ourSemantics) { … }
IEEEFloat::IEEEFloat(const fltSemantics &ourSemantics, uninitializedTag tag)
: … { … }
IEEEFloat::IEEEFloat(const IEEEFloat &rhs) { … }
IEEEFloat::IEEEFloat(IEEEFloat &&rhs) : … { … }
IEEEFloat::~IEEEFloat() { … }
unsigned int IEEEFloat::partCount() const { … }
const APFloat::integerPart *IEEEFloat::significandParts() const { … }
APFloat::integerPart *IEEEFloat::significandParts() { … }
void IEEEFloat::zeroSignificand() { … }
void IEEEFloat::incrementSignificand() { … }
APFloat::integerPart IEEEFloat::addSignificand(const IEEEFloat &rhs) { … }
APFloat::integerPart IEEEFloat::subtractSignificand(const IEEEFloat &rhs,
integerPart borrow) { … }
lostFraction IEEEFloat::multiplySignificand(const IEEEFloat &rhs,
IEEEFloat addend,
bool ignoreAddend) { … }
lostFraction IEEEFloat::multiplySignificand(const IEEEFloat &rhs) { … }
lostFraction IEEEFloat::divideSignificand(const IEEEFloat &rhs) { … }
unsigned int IEEEFloat::significandMSB() const { … }
unsigned int IEEEFloat::significandLSB() const { … }
lostFraction IEEEFloat::shiftSignificandRight(unsigned int bits) { … }
void IEEEFloat::shiftSignificandLeft(unsigned int bits) { … }
APFloat::cmpResult IEEEFloat::compareAbsoluteValue(const IEEEFloat &rhs) const { … }
static void tcSetLeastSignificantBits(APInt::WordType *dst, unsigned parts,
unsigned bits) { … }
APFloat::opStatus IEEEFloat::handleOverflow(roundingMode rounding_mode) { … }
bool IEEEFloat::roundAwayFromZero(roundingMode rounding_mode,
lostFraction lost_fraction,
unsigned int bit) const { … }
APFloat::opStatus IEEEFloat::normalize(roundingMode rounding_mode,
lostFraction lost_fraction) { … }
APFloat::opStatus IEEEFloat::addOrSubtractSpecials(const IEEEFloat &rhs,
bool subtract) { … }
lostFraction IEEEFloat::addOrSubtractSignificand(const IEEEFloat &rhs,
bool subtract) { … }
APFloat::opStatus IEEEFloat::multiplySpecials(const IEEEFloat &rhs) { … }
APFloat::opStatus IEEEFloat::divideSpecials(const IEEEFloat &rhs) { … }
APFloat::opStatus IEEEFloat::modSpecials(const IEEEFloat &rhs) { … }
APFloat::opStatus IEEEFloat::remainderSpecials(const IEEEFloat &rhs) { … }
void IEEEFloat::changeSign() { … }
APFloat::opStatus IEEEFloat::addOrSubtract(const IEEEFloat &rhs,
roundingMode rounding_mode,
bool subtract) { … }
APFloat::opStatus IEEEFloat::add(const IEEEFloat &rhs,
roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::subtract(const IEEEFloat &rhs,
roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::multiply(const IEEEFloat &rhs,
roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::divide(const IEEEFloat &rhs,
roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::remainder(const IEEEFloat &rhs) { … }
APFloat::opStatus IEEEFloat::mod(const IEEEFloat &rhs) { … }
APFloat::opStatus IEEEFloat::fusedMultiplyAdd(const IEEEFloat &multiplicand,
const IEEEFloat &addend,
roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::roundToIntegral(roundingMode rounding_mode) { … }
APFloat::cmpResult IEEEFloat::compare(const IEEEFloat &rhs) const { … }
APFloat::opStatus IEEEFloat::convert(const fltSemantics &toSemantics,
roundingMode rounding_mode,
bool *losesInfo) { … }
APFloat::opStatus IEEEFloat::convertToSignExtendedInteger(
MutableArrayRef<integerPart> parts, unsigned int width, bool isSigned,
roundingMode rounding_mode, bool *isExact) const { … }
APFloat::opStatus
IEEEFloat::convertToInteger(MutableArrayRef<integerPart> parts,
unsigned int width, bool isSigned,
roundingMode rounding_mode, bool *isExact) const { … }
APFloat::opStatus IEEEFloat::convertFromUnsignedParts(
const integerPart *src, unsigned int srcCount, roundingMode rounding_mode) { … }
APFloat::opStatus IEEEFloat::convertFromAPInt(const APInt &Val, bool isSigned,
roundingMode rounding_mode) { … }
APFloat::opStatus
IEEEFloat::convertFromSignExtendedInteger(const integerPart *src,
unsigned int srcCount, bool isSigned,
roundingMode rounding_mode) { … }
APFloat::opStatus
IEEEFloat::convertFromZeroExtendedInteger(const integerPart *parts,
unsigned int width, bool isSigned,
roundingMode rounding_mode) { … }
Expected<APFloat::opStatus>
IEEEFloat::convertFromHexadecimalString(StringRef s,
roundingMode rounding_mode) { … }
APFloat::opStatus
IEEEFloat::roundSignificandWithExponent(const integerPart *decSigParts,
unsigned sigPartCount, int exp,
roundingMode rounding_mode) { … }
Expected<APFloat::opStatus>
IEEEFloat::convertFromDecimalString(StringRef str, roundingMode rounding_mode) { … }
bool IEEEFloat::convertFromStringSpecials(StringRef str) { … }
Expected<APFloat::opStatus>
IEEEFloat::convertFromString(StringRef str, roundingMode rounding_mode) { … }
unsigned int IEEEFloat::convertToHexString(char *dst, unsigned int hexDigits,
bool upperCase,
roundingMode rounding_mode) const { … }
char *IEEEFloat::convertNormalToHexString(char *dst, unsigned int hexDigits,
bool upperCase,
roundingMode rounding_mode) const { … }
hash_code hash_value(const IEEEFloat &Arg) { … }
APInt IEEEFloat::convertF80LongDoubleAPFloatToAPInt() const { … }
APInt IEEEFloat::convertPPCDoubleDoubleAPFloatToAPInt() const { … }
template <const fltSemantics &S>
APInt IEEEFloat::convertIEEEFloatToAPInt() const { … }
APInt IEEEFloat::convertQuadrupleAPFloatToAPInt() const { … }
APInt IEEEFloat::convertDoubleAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloatAPFloatToAPInt() const { … }
APInt IEEEFloat::convertBFloatAPFloatToAPInt() const { … }
APInt IEEEFloat::convertHalfAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E5M2APFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E5M2FNUZAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E4M3APFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E4M3FNAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E4M3FNUZAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E4M3B11FNUZAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E3M4APFloatToAPInt() const { … }
APInt IEEEFloat::convertFloatTF32APFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat8E8M0FNUAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat6E3M2FNAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat6E2M3FNAPFloatToAPInt() const { … }
APInt IEEEFloat::convertFloat4E2M1FNAPFloatToAPInt() const { … }
APInt IEEEFloat::bitcastToAPInt() const { … }
float IEEEFloat::convertToFloat() const { … }
double IEEEFloat::convertToDouble() const { … }
#ifdef HAS_IEE754_FLOAT128
float128 IEEEFloat::convertToQuad() const { … }
#endif
void IEEEFloat::initFromF80LongDoubleAPInt(const APInt &api) { … }
void IEEEFloat::initFromPPCDoubleDoubleAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E8M0FNUAPInt(const APInt &api) { … }
template <const fltSemantics &S>
void IEEEFloat::initFromIEEEAPInt(const APInt &api) { … }
void IEEEFloat::initFromQuadrupleAPInt(const APInt &api) { … }
void IEEEFloat::initFromDoubleAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloatAPInt(const APInt &api) { … }
void IEEEFloat::initFromBFloatAPInt(const APInt &api) { … }
void IEEEFloat::initFromHalfAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E5M2APInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E5M2FNUZAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E4M3APInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E4M3FNAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E4M3FNUZAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E4M3B11FNUZAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat8E3M4APInt(const APInt &api) { … }
void IEEEFloat::initFromFloatTF32APInt(const APInt &api) { … }
void IEEEFloat::initFromFloat6E3M2FNAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat6E2M3FNAPInt(const APInt &api) { … }
void IEEEFloat::initFromFloat4E2M1FNAPInt(const APInt &api) { … }
void IEEEFloat::initFromAPInt(const fltSemantics *Sem, const APInt &api) { … }
void IEEEFloat::makeLargest(bool Negative) { … }
void IEEEFloat::makeSmallest(bool Negative) { … }
void IEEEFloat::makeSmallestNormalized(bool Negative) { … }
IEEEFloat::IEEEFloat(const fltSemantics &Sem, const APInt &API) { … }
IEEEFloat::IEEEFloat(float f) { … }
IEEEFloat::IEEEFloat(double d) { … }
namespace {
void append(SmallVectorImpl<char> &Buffer, StringRef Str) { … }
void AdjustToPrecision(APInt &significand,
int &exp, unsigned FormatPrecision) { … }
void AdjustToPrecision(SmallVectorImpl<char> &buffer,
int &exp, unsigned FormatPrecision) { … }
void toStringImpl(SmallVectorImpl<char> &Str, const bool isNeg, int exp,
APInt significand, unsigned FormatPrecision,
unsigned FormatMaxPadding, bool TruncateZero) { … }
}
void IEEEFloat::toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision,
unsigned FormatMaxPadding, bool TruncateZero) const { … }
bool IEEEFloat::getExactInverse(APFloat *inv) const { … }
int IEEEFloat::getExactLog2Abs() const { … }
bool IEEEFloat::isSignaling() const { … }
APFloat::opStatus IEEEFloat::next(bool nextDown) { … }
APFloatBase::ExponentType IEEEFloat::exponentNaN() const { … }
APFloatBase::ExponentType IEEEFloat::exponentInf() const { … }
APFloatBase::ExponentType IEEEFloat::exponentZero() const { … }
void IEEEFloat::makeInf(bool Negative) { … }
void IEEEFloat::makeZero(bool Negative) { … }
void IEEEFloat::makeQuiet() { … }
int ilogb(const IEEEFloat &Arg) { … }
IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode RoundingMode) { … }
IEEEFloat frexp(const IEEEFloat &Val, int &Exp, roundingMode RM) { … }
DoubleAPFloat::DoubleAPFloat(const fltSemantics &S)
: … { … }
DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, uninitializedTag)
: … { … }
DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, integerPart I)
: … { … }
DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, const APInt &I)
: … { … }
DoubleAPFloat::DoubleAPFloat(const fltSemantics &S, APFloat &&First,
APFloat &&Second)
: … { … }
DoubleAPFloat::DoubleAPFloat(const DoubleAPFloat &RHS)
: … { … }
DoubleAPFloat::DoubleAPFloat(DoubleAPFloat &&RHS)
: … { … }
DoubleAPFloat &DoubleAPFloat::operator=(const DoubleAPFloat &RHS) { … }
APFloat::opStatus DoubleAPFloat::addImpl(const APFloat &a, const APFloat &aa,
const APFloat &c, const APFloat &cc,
roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::addWithSpecial(const DoubleAPFloat &LHS,
const DoubleAPFloat &RHS,
DoubleAPFloat &Out,
roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::add(const DoubleAPFloat &RHS,
roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::subtract(const DoubleAPFloat &RHS,
roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::multiply(const DoubleAPFloat &RHS,
APFloat::roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::divide(const DoubleAPFloat &RHS,
APFloat::roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::remainder(const DoubleAPFloat &RHS) { … }
APFloat::opStatus DoubleAPFloat::mod(const DoubleAPFloat &RHS) { … }
APFloat::opStatus
DoubleAPFloat::fusedMultiplyAdd(const DoubleAPFloat &Multiplicand,
const DoubleAPFloat &Addend,
APFloat::roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::roundToIntegral(APFloat::roundingMode RM) { … }
void DoubleAPFloat::changeSign() { … }
APFloat::cmpResult
DoubleAPFloat::compareAbsoluteValue(const DoubleAPFloat &RHS) const { … }
APFloat::fltCategory DoubleAPFloat::getCategory() const { … }
bool DoubleAPFloat::isNegative() const { … }
void DoubleAPFloat::makeInf(bool Neg) { … }
void DoubleAPFloat::makeZero(bool Neg) { … }
void DoubleAPFloat::makeLargest(bool Neg) { … }
void DoubleAPFloat::makeSmallest(bool Neg) { … }
void DoubleAPFloat::makeSmallestNormalized(bool Neg) { … }
void DoubleAPFloat::makeNaN(bool SNaN, bool Neg, const APInt *fill) { … }
APFloat::cmpResult DoubleAPFloat::compare(const DoubleAPFloat &RHS) const { … }
bool DoubleAPFloat::bitwiseIsEqual(const DoubleAPFloat &RHS) const { … }
hash_code hash_value(const DoubleAPFloat &Arg) { … }
APInt DoubleAPFloat::bitcastToAPInt() const { … }
Expected<APFloat::opStatus> DoubleAPFloat::convertFromString(StringRef S,
roundingMode RM) { … }
APFloat::opStatus DoubleAPFloat::next(bool nextDown) { … }
APFloat::opStatus
DoubleAPFloat::convertToInteger(MutableArrayRef<integerPart> Input,
unsigned int Width, bool IsSigned,
roundingMode RM, bool *IsExact) const { … }
APFloat::opStatus DoubleAPFloat::convertFromAPInt(const APInt &Input,
bool IsSigned,
roundingMode RM) { … }
APFloat::opStatus
DoubleAPFloat::convertFromSignExtendedInteger(const integerPart *Input,
unsigned int InputSize,
bool IsSigned, roundingMode RM) { … }
APFloat::opStatus
DoubleAPFloat::convertFromZeroExtendedInteger(const integerPart *Input,
unsigned int InputSize,
bool IsSigned, roundingMode RM) { … }
unsigned int DoubleAPFloat::convertToHexString(char *DST,
unsigned int HexDigits,
bool UpperCase,
roundingMode RM) const { … }
bool DoubleAPFloat::isDenormal() const { … }
bool DoubleAPFloat::isSmallest() const { … }
bool DoubleAPFloat::isSmallestNormalized() const { … }
bool DoubleAPFloat::isLargest() const { … }
bool DoubleAPFloat::isInteger() const { … }
void DoubleAPFloat::toString(SmallVectorImpl<char> &Str,
unsigned FormatPrecision,
unsigned FormatMaxPadding,
bool TruncateZero) const { … }
bool DoubleAPFloat::getExactInverse(APFloat *inv) const { … }
int DoubleAPFloat::getExactLog2() const { … }
int DoubleAPFloat::getExactLog2Abs() const { … }
DoubleAPFloat scalbn(const DoubleAPFloat &Arg, int Exp,
APFloat::roundingMode RM) { … }
DoubleAPFloat frexp(const DoubleAPFloat &Arg, int &Exp,
APFloat::roundingMode RM) { … }
}
APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) { … }
Expected<APFloat::opStatus> APFloat::convertFromString(StringRef Str,
roundingMode RM) { … }
hash_code hash_value(const APFloat &Arg) { … }
APFloat::APFloat(const fltSemantics &Semantics, StringRef S)
: … { … }
FPClassTest APFloat::classify() const { … }
APFloat::opStatus APFloat::convert(const fltSemantics &ToSemantics,
roundingMode RM, bool *losesInfo) { … }
APFloat APFloat::getAllOnesValue(const fltSemantics &Semantics) { … }
void APFloat::print(raw_ostream &OS) const { … }
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void APFloat::dump() const {
print(dbgs());
dbgs() << '\n';
}
#endif
void APFloat::Profile(FoldingSetNodeID &NID) const { … }
APFloat::opStatus APFloat::convertToInteger(APSInt &result,
roundingMode rounding_mode,
bool *isExact) const { … }
double APFloat::convertToDouble() const { … }
#ifdef HAS_IEE754_FLOAT128
float128 APFloat::convertToQuad() const { … }
#endif
float APFloat::convertToFloat() const { … }
}
#undef APFLOAT_DISPATCH_ON_SEMANTICS