class APFloat

Declaration

class APFloat : public APFloatBase { /* full declaration omitted */ };

Description

A self-contained host- and target-independent arbitrary-precision floating-point software implementation. APFloat uses bignum integer arithmetic as provided by static functions in the APInt class. The library will work with bignum integers whose parts are any unsigned type at least 16 bits wide, but 64 bits is recommended. Written for clarity rather than speed, in particular with a view to use in the front-end of a cross compiler so that target arithmetic can be correctly performed on the host. Performance should nonetheless be reasonable, particularly for its intended use. It may be useful as a base implementation for a run-time library during development of a faster target-specific one. All 5 rounding modes in the IEEE-754R draft are handled correctly for all implemented operations. Currently implemented operations are add, subtract, multiply, divide, fused-multiply-add, conversion-to-float, conversion-to-integer and conversion-from-integer. New rounding modes (e.g. away from zero) can be added with three or four lines of code. Four formats are built-in: IEEE single precision, double precision, quadruple precision, and x87 80-bit extended double (when operating with full extended precision). Adding a new format that obeys IEEE semantics only requires adding two lines of code: a declaration and definition of the format. All operations return the status of that operation as an exception bit-mask, so multiple operations can be done consecutively with their results or-ed together. The returned status can be useful for compiler diagnostics; e.g., inexact, underflow and overflow can be easily diagnosed on constant folding, and compiler optimizers can determine what exceptions would be raised by folding operations and optimize, or perhaps not optimize, accordingly. At present, underflow tininess is detected after rounding; it should be straight forward to add support for the before-rounding case too. The library reads hexadecimal floating point numbers as per C99, and correctly rounds if necessary according to the specified rounding mode. Syntax is required to have been validated by the caller. It also converts floating point numbers to hexadecimal text as per the C99 %a and %A conversions. The output precision (or alternatively the natural minimal precision) can be specified; if the requested precision is less than the natural precision the output is correctly rounded for the specified rounding mode. It also reads decimal floating point numbers and correctly rounds according to the specified rounding mode. Conversion to decimal text is not currently implemented. Non-zero finite numbers are represented internally as a sign bit, a 16-bit signed exponent, and the significand as an array of integer parts. After normalization of a number of precision P the exponent is within the range of the format, and if the number is not denormal the P-th bit of the significand is set as an explicit integer bit. For denormals the most significant bit is shifted right so that the exponent is maintained at the format's minimum, so that the smallest denormal has just the least significant bit of the significand set. The sign of zeroes and infinities is significant; the exponent and significand of such numbers is not stored, but has a known implicit (deterministic) value: 0 for the significands, 0 for zero exponent, all 1 bits for infinity exponent. For NaNs the sign and significand are deterministic, although not really meaningful, and preserved in non-conversion operations. The exponent is implicitly all 1 bits. APFloat does not provide any exception handling beyond default exception handling. We represent Signaling NaNs via IEEE-754R 2008 6.2.1 should clause by encoding Signaling NaNs with the first bit of its trailing significand as 0. TODO ==== Some features that may or may not be worth adding: Binary to decimal conversion (hard). Optional ability to detect underflow tininess before rounding. New formats: x87 in single and double precision mode (IEEE apart from extended exponent range) (hard). New operations: sqrt, IEEE remainder, C90 fmod, nexttoward.

Declared at: llvm/include/llvm/ADT/APFloat.h:701

Inherits from: APFloatBase

Member Variables

private union Storage U

Inherited from APFloatBase:

public static integerPartWidth = APInt::APINT_BITS_PER_WORD
public static rmNearestTiesToEven = RoundingMode::NearestTiesToEven
public static rmTowardPositive = RoundingMode::TowardPositive
public static rmTowardNegative = RoundingMode::TowardNegative
public static rmTowardZero = RoundingMode::TowardZero
public static rmNearestTiesToAway = RoundingMode::NearestTiesToAway

Method Overview

  • private APFloat(llvm::APFloat::IEEEFloat F, const llvm::fltSemantics & S)
  • public APFloat(double d)
  • public APFloat(const llvm::fltSemantics & Semantics, const llvm::APInt & I)
  • public APFloat(const llvm::fltSemantics & Semantics, llvm::APFloatBase::uninitializedTag)
  • public APFloat(const llvm::fltSemantics & Semantics, llvm::APFloatBase::integerPart I)
  • public APFloat(const llvm::fltSemantics & Semantics, llvm::StringRef S)
  • public APFloat(const llvm::fltSemantics & Semantics)
  • public APFloat(float f)
  • private APFloat(llvm::APFloat::DoubleAPFloat F, const llvm::fltSemantics & S)
  • private APFloat()
  • public APFloat(const llvm::APFloat & RHS)
  • public APFloat(llvm::APFloat && RHS)
  • public template <typename T, typename = std::enable_if_t<std::is_floating_point<T>::value>> APFloat(const llvm::fltSemantics & Semantics, T V)
  • public void Profile(llvm::FoldingSetNodeID & NID) const
  • public llvm::APFloatBase::opStatus add(const llvm::APFloat & RHS, llvm::APFloatBase::roundingMode RM)
  • public llvm::APInt bitcastToAPInt() const
  • public bool bitwiseIsEqual(const llvm::APFloat & RHS) const
  • public void changeSign()
  • public void clearSign()
  • public llvm::APFloatBase::cmpResult compare(const llvm::APFloat & RHS) const
  • private llvm::APFloatBase::cmpResult compareAbsoluteValue(const llvm::APFloat & RHS) const
  • public llvm::APFloatBase::opStatus convert(const llvm::fltSemantics & ToSemantics, llvm::APFloatBase::roundingMode RM, bool * losesInfo)
  • public llvm::APFloatBase::opStatus convertFromAPInt(const llvm::APInt & Input, bool IsSigned, llvm::APFloatBase::roundingMode RM)
  • public llvm::APFloatBase::opStatus convertFromSignExtendedInteger(const llvm::APFloatBase::integerPart * Input, unsigned int InputSize, bool IsSigned, llvm::APFloatBase::roundingMode RM)
  • public Expected<llvm::APFloatBase::opStatus> convertFromString(llvm::StringRef, llvm::APFloatBase::roundingMode)
  • public llvm::APFloatBase::opStatus convertFromZeroExtendedInteger(const llvm::APFloatBase::integerPart * Input, unsigned int InputSize, bool IsSigned, llvm::APFloatBase::roundingMode RM)
  • public double convertToDouble() const
  • public float convertToFloat() const
  • public unsigned int convertToHexString(char * DST, unsigned int HexDigits, bool UpperCase, llvm::APFloatBase::roundingMode RM) const
  • public llvm::APFloatBase::opStatus convertToInteger(llvm::APSInt & Result, llvm::APFloatBase::roundingMode RM, bool * IsExact) const
  • public llvm::APFloatBase::opStatus convertToInteger(MutableArrayRef<llvm::APFloatBase::integerPart> Input, unsigned int Width, bool IsSigned, llvm::APFloatBase::roundingMode RM, bool * IsExact) const
  • public static llvm::APFloat copySign(llvm::APFloat Value, const llvm::APFloat & Sign)
  • public void copySign(const llvm::APFloat & RHS)
  • public llvm::APFloatBase::opStatus divide(const llvm::APFloat & RHS, llvm::APFloatBase::roundingMode RM)
  • public void dump() const
  • public llvm::APFloatBase::opStatus fusedMultiplyAdd(const llvm::APFloat & Multiplicand, const llvm::APFloat & Addend, llvm::APFloatBase::roundingMode RM)
  • public static llvm::APFloat getAllOnesValue(const llvm::fltSemantics & Semantics)
  • public llvm::APFloatBase::fltCategory getCategory() const
  • public bool getExactInverse(llvm::APFloat * inv) const
  • private const llvm::APFloat::IEEEFloat & getIEEE() const
  • private llvm::APFloat::IEEEFloat & getIEEE()
  • public static llvm::APFloat getInf(const llvm::fltSemantics & Sem, bool Negative = false)
  • public static llvm::APFloat getLargest(const llvm::fltSemantics & Sem, bool Negative = false)
  • public static llvm::APFloat getNaN(const llvm::fltSemantics & Sem, bool Negative = false, uint64_t payload = 0)
  • public static llvm::APFloat getQNaN(const llvm::fltSemantics & Sem, bool Negative = false, const llvm::APInt * payload = nullptr)
  • public static llvm::APFloat getSNaN(const llvm::fltSemantics & Sem, bool Negative = false, const llvm::APInt * payload = nullptr)
  • public const llvm::fltSemantics & getSemantics() const
  • public static llvm::APFloat getSmallest(const llvm::fltSemantics & Sem, bool Negative = false)
  • public static llvm::APFloat getSmallestNormalized(const llvm::fltSemantics & Sem, bool Negative = false)
  • public static llvm::APFloat getZero(const llvm::fltSemantics & Sem, bool Negative = false)
  • public bool isDenormal() const
  • public bool isExactlyValue(double V) const
  • public bool isFinite() const
  • public bool isFiniteNonZero() const
  • public bool isIEEE() const
  • public bool isInfinity() const
  • public bool isInteger() const
  • public bool isLargest() const
  • public bool isNaN() const
  • public bool isNegZero() const
  • public bool isNegative() const
  • public bool isNonZero() const
  • public bool isNormal() const
  • public bool isPosZero() const
  • public bool isSignaling() const
  • public bool isSmallest() const
  • public bool isZero() const
  • private void makeInf(bool Neg)
  • private void makeLargest(bool Neg)
  • private void makeNaN(bool SNaN, bool Neg, const llvm::APInt * fill)
  • private void makeSmallest(bool Neg)
  • private void makeSmallestNormalized(bool Neg)
  • private void makeZero(bool Neg)
  • public llvm::APFloatBase::opStatus mod(const llvm::APFloat & RHS)
  • public llvm::APFloatBase::opStatus multiply(const llvm::APFloat & RHS, llvm::APFloatBase::roundingMode RM)
  • public bool needsCleanup() const
  • public llvm::APFloatBase::opStatus next(bool nextDown)
  • public void print(llvm::raw_ostream &) const
  • public llvm::APFloatBase::opStatus remainder(const llvm::APFloat & RHS)
  • public llvm::APFloatBase::opStatus roundToIntegral(llvm::APFloatBase::roundingMode RM)
  • public llvm::APFloatBase::opStatus subtract(const llvm::APFloat & RHS, llvm::APFloatBase::roundingMode RM)
  • public void toString(SmallVectorImpl<char> & Str, unsigned int FormatPrecision = 0, unsigned int FormatMaxPadding = 3, bool TruncateZero = true) const
  • private template <typename T>static bool usesLayout(const llvm::fltSemantics & Semantics)
  • public ~APFloat()

Inherited from APFloatBase:

Methods

APFloat(llvm::APFloat::IEEEFloat F,
        const llvm::fltSemantics& S)

Declared at: llvm/include/llvm/ADT/APFloat.h:848

Parameters

llvm::APFloat::IEEEFloat F
const llvm::fltSemantics& S

APFloat(double d)

Declared at: llvm/include/llvm/ADT/APFloat.h:873

Parameters

double d

APFloat(const llvm::fltSemantics& Semantics,
        const llvm::APInt& I)

Declared at: llvm/include/llvm/ADT/APFloat.h:872

Parameters

const llvm::fltSemantics& Semantics
const llvm::APInt& I

APFloat(const llvm::fltSemantics& Semantics,
        llvm::APFloatBase::uninitializedTag)

Declared at: llvm/include/llvm/ADT/APFloat.h:870

Parameters

const llvm::fltSemantics& Semantics
llvm::APFloatBase::uninitializedTag

APFloat(const llvm::fltSemantics& Semantics,
        llvm::APFloatBase::integerPart I)

Declared at: llvm/include/llvm/ADT/APFloat.h:865

Parameters

const llvm::fltSemantics& Semantics
llvm::APFloatBase::integerPart I

APFloat(const llvm::fltSemantics& Semantics,
        llvm::StringRef S)

Declared at: llvm/include/llvm/ADT/APFloat.h:864

Parameters

const llvm::fltSemantics& Semantics
llvm::StringRef S

APFloat(const llvm::fltSemantics& Semantics)

Declared at: llvm/include/llvm/ADT/APFloat.h:863

Parameters

const llvm::fltSemantics& Semantics

APFloat(float f)

Declared at: llvm/include/llvm/ADT/APFloat.h:874

Parameters

float f

APFloat(llvm::APFloat::DoubleAPFloat F,
        const llvm::fltSemantics& S)

Declared at: llvm/include/llvm/ADT/APFloat.h:849

Parameters

llvm::APFloat::DoubleAPFloat F
const llvm::fltSemantics& S

APFloat()

Declared at: llvm/include/llvm/ADT/APFloat.h:844

APFloat(const llvm::APFloat& RHS)

Declared at: llvm/include/llvm/ADT/APFloat.h:875

Parameters

const llvm::APFloat& RHS

APFloat(llvm::APFloat&& RHS)

Declared at: llvm/include/llvm/ADT/APFloat.h:876

Parameters

llvm::APFloat&& RHS

template <typename T,
          typename = std::enable_if_t<
              std::is_floating_point<T>::value>>
APFloat(const llvm::fltSemantics& Semantics, T V)

Declared at: llvm/include/llvm/ADT/APFloat.h:868

Templates

T
= std::enable_if_t<std::is_floating_point<T>::value>

Parameters

const llvm::fltSemantics& Semantics
T V

void Profile(llvm::FoldingSetNodeID& NID) const

Description

Used to insert APFloat objects, or objects that contain APFloat objects, into FoldingSets.

Declared at: llvm/include/llvm/ADT/APFloat.h:968

Parameters

llvm::FoldingSetNodeID& NID

llvm::APFloatBase::opStatus add(
    const llvm::APFloat& RHS,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:970

Parameters

const llvm::APFloat& RHS
llvm::APFloatBase::roundingMode RM

llvm::APInt bitcastToAPInt() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1130

bool bitwiseIsEqual(
    const llvm::APFloat& RHS) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1180

Parameters

const llvm::APFloat& RHS

void changeSign()

Declared at: llvm/include/llvm/ADT/APFloat.h:1086

void clearSign()

Declared at: llvm/include/llvm/ADT/APFloat.h:1087

llvm::APFloatBase::cmpResult compare(
    const llvm::APFloat& RHS) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1170

Parameters

const llvm::APFloat& RHS

llvm::APFloatBase::cmpResult compareAbsoluteValue(
    const llvm::APFloat& RHS) const

Declared at: llvm/include/llvm/ADT/APFloat.h:852

Parameters

const llvm::APFloat& RHS

llvm::APFloatBase::opStatus convert(
    const llvm::fltSemantics& ToSemantics,
    llvm::APFloatBase::roundingMode RM,
    bool* losesInfo)

Declared at: llvm/include/llvm/ADT/APFloat.h:1103

Parameters

const llvm::fltSemantics& ToSemantics
llvm::APFloatBase::roundingMode RM
bool* losesInfo

llvm::APFloatBase::opStatus convertFromAPInt(
    const llvm::APInt& Input,
    bool IsSigned,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:1113

Parameters

const llvm::APInt& Input
bool IsSigned
llvm::APFloatBase::roundingMode RM

llvm::APFloatBase::opStatus
convertFromSignExtendedInteger(
    const llvm::APFloatBase::integerPart* Input,
    unsigned int InputSize,
    bool IsSigned,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:1117

Parameters

const llvm::APFloatBase::integerPart* Input
unsigned int InputSize
bool IsSigned
llvm::APFloatBase::roundingMode RM

Expected<llvm::APFloatBase::opStatus>
convertFromString(llvm::StringRef,
                  llvm::APFloatBase::roundingMode)

Declared at: llvm/include/llvm/ADT/APFloat.h:1129

Parameters

llvm::StringRef
llvm::APFloatBase::roundingMode

llvm::APFloatBase::opStatus
convertFromZeroExtendedInteger(
    const llvm::APFloatBase::integerPart* Input,
    unsigned int InputSize,
    bool IsSigned,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:1123

Parameters

const llvm::APFloatBase::integerPart* Input
unsigned int InputSize
bool IsSigned
llvm::APFloatBase::roundingMode RM

double convertToDouble() const

Description

Converts this APFloat to host double value.

Declared at: llvm/include/llvm/ADT/APFloat.h:1139

float convertToFloat() const

Description

Converts this APFloat to host float value.

Declared at: llvm/include/llvm/ADT/APFloat.h:1146

unsigned int convertToHexString(
    char* DST,
    unsigned int HexDigits,
    bool UpperCase,
    llvm::APFloatBase::roundingMode RM) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1205

Parameters

char* DST
unsigned int HexDigits
bool UpperCase
llvm::APFloatBase::roundingMode RM

llvm::APFloatBase::opStatus convertToInteger(
    llvm::APSInt& Result,
    llvm::APFloatBase::roundingMode RM,
    bool* IsExact) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1111

Parameters

llvm::APSInt& Result
llvm::APFloatBase::roundingMode RM
bool* IsExact

llvm::APFloatBase::opStatus convertToInteger(
    MutableArrayRef<
        llvm::APFloatBase::integerPart> Input,
    unsigned int Width,
    bool IsSigned,
    llvm::APFloatBase::roundingMode RM,
    bool* IsExact) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1105

Parameters

MutableArrayRef<llvm::APFloatBase::integerPart> Input
unsigned int Width
bool IsSigned
llvm::APFloatBase::roundingMode RM
bool* IsExact

static llvm::APFloat copySign(
    llvm::APFloat Value,
    const llvm::APFloat& Sign)

Description

A static helper to produce a copy of an APFloat value with its sign copied from some other APFloat.

Declared at: llvm/include/llvm/ADT/APFloat.h:1098

Parameters

llvm::APFloat Value
const llvm::APFloat& Sign

void copySign(const llvm::APFloat& RHS)

Declared at: llvm/include/llvm/ADT/APFloat.h:1091

Parameters

const llvm::APFloat& RHS

llvm::APFloatBase::opStatus divide(
    const llvm::APFloat& RHS,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:997

Parameters

const llvm::APFloat& RHS
llvm::APFloatBase::roundingMode RM

void dump() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1243

llvm::APFloatBase::opStatus fusedMultiplyAdd(
    const llvm::APFloat& Multiplicand,
    const llvm::APFloat& Addend,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:1024

Parameters

const llvm::APFloat& Multiplicand
const llvm::APFloat& Addend
llvm::APFloatBase::roundingMode RM

static llvm::APFloat getAllOnesValue(
    const llvm::fltSemantics& Semantics)

Description

Returns a float which is bitcasted from an all one value int.

Declared at: llvm/include/llvm/ADT/APFloat.h:964

Parameters

const llvm::fltSemantics& Semantics
- type float semantics

llvm::APFloatBase::fltCategory getCategory() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1222

bool getExactInverse(llvm::APFloat* inv) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1245

Parameters

llvm::APFloat* inv

const llvm::APFloat::IEEEFloat& getIEEE() const

Declared at: llvm/include/llvm/ADT/APFloat.h:813

llvm::APFloat::IEEEFloat& getIEEE()

Declared at: llvm/include/llvm/ADT/APFloat.h:805

static llvm::APFloat getInf(
    const llvm::fltSemantics& Sem,
    bool Negative = false)

Description

Factory for Positive and Negative Infinity.

Declared at: llvm/include/llvm/ADT/APFloat.h:894

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
True iff the number should be negative.

static llvm::APFloat getLargest(
    const llvm::fltSemantics& Sem,
    bool Negative = false)

Description

Returns the largest finite number in the given semantics.

Declared at: llvm/include/llvm/ADT/APFloat.h:934

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
- True iff the number should be negative

static llvm::APFloat getNaN(
    const llvm::fltSemantics& Sem,
    bool Negative = false,
    uint64_t payload = 0)

Description

Factory for NaN values.

Declared at: llvm/include/llvm/ADT/APFloat.h:905

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
- True iff the NaN generated should be negative.
uint64_t payload = 0
- The unspecified fill bits for creating the NaN, 0 by default. The value is truncated as necessary.

static llvm::APFloat getQNaN(
    const llvm::fltSemantics& Sem,
    bool Negative = false,
    const llvm::APInt* payload = nullptr)

Description

Factory for QNaN values.

Declared at: llvm/include/llvm/ADT/APFloat.h:916

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
const llvm::APInt* payload = nullptr

static llvm::APFloat getSNaN(
    const llvm::fltSemantics& Sem,
    bool Negative = false,
    const llvm::APInt* payload = nullptr)

Description

Factory for SNaN values.

Declared at: llvm/include/llvm/ADT/APFloat.h:924

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
const llvm::APInt* payload = nullptr

const llvm::fltSemantics& getSemantics() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1223

static llvm::APFloat getSmallest(
    const llvm::fltSemantics& Sem,
    bool Negative = false)

Description

Returns the smallest (by magnitude) finite number in the given semantics. Might be denormalized, which implies a relative loss of precision.

Declared at: llvm/include/llvm/ADT/APFloat.h:944

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
- True iff the number should be negative

static llvm::APFloat getSmallestNormalized(
    const llvm::fltSemantics& Sem,
    bool Negative = false)

Description

Returns the smallest (by magnitude) normalized finite number in the given semantics.

Declared at: llvm/include/llvm/ADT/APFloat.h:954

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
- True iff the number should be negative

static llvm::APFloat getZero(
    const llvm::fltSemantics& Sem,
    bool Negative = false)

Description

Factory for Positive and Negative Zero.

Declared at: llvm/include/llvm/ADT/APFloat.h:885

Parameters

const llvm::fltSemantics& Sem
bool Negative = false
True iff the number should be negative.

bool isDenormal() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1216

bool isExactlyValue(double V) const

Description

We don't rely on operator== working on double values, as it returns true for things that are clearly not equal, like -0.0 and 0.0. As such, this method can be used to do an exact bit-for-bit comparison of two floating point values. We leave the version with the double argument here because it's just so convenient to write "2.0" and the like. Without this function we'd have to duplicate its logic everywhere it's called.

Declared at: llvm/include/llvm/ADT/APFloat.h:1198

Parameters

double V

bool isFinite() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1220

bool isFiniteNonZero() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1225

bool isIEEE() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1231

bool isInfinity() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1212

bool isInteger() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1230

bool isLargest() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1229

bool isNaN() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1213

bool isNegZero() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1227

bool isNegative() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1215

bool isNonZero() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1224

bool isNormal() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1219

bool isPosZero() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1226

bool isSignaling() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1217

bool isSmallest() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1228

bool isZero() const

Declared at: llvm/include/llvm/ADT/APFloat.h:1211

void makeInf(bool Neg)

Declared at: llvm/include/llvm/ADT/APFloat.h:823

Parameters

bool Neg

void makeLargest(bool Neg)

Declared at: llvm/include/llvm/ADT/APFloat.h:829

Parameters

bool Neg

void makeNaN(bool SNaN,
             bool Neg,
             const llvm::APInt* fill)

Declared at: llvm/include/llvm/ADT/APFloat.h:825

Parameters

bool SNaN
bool Neg
const llvm::APInt* fill

void makeSmallest(bool Neg)

Declared at: llvm/include/llvm/ADT/APFloat.h:833

Parameters

bool Neg

void makeSmallestNormalized(bool Neg)

Declared at: llvm/include/llvm/ADT/APFloat.h:837

Parameters

bool Neg

void makeZero(bool Neg)

Declared at: llvm/include/llvm/ADT/APFloat.h:821

Parameters

bool Neg

llvm::APFloatBase::opStatus mod(
    const llvm::APFloat& RHS)

Declared at: llvm/include/llvm/ADT/APFloat.h:1015

Parameters

const llvm::APFloat& RHS

llvm::APFloatBase::opStatus multiply(
    const llvm::APFloat& RHS,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:988

Parameters

const llvm::APFloat& RHS
llvm::APFloatBase::roundingMode RM

bool needsCleanup() const

Declared at: llvm/include/llvm/ADT/APFloat.h:880

llvm::APFloatBase::opStatus next(bool nextDown)

Declared at: llvm/include/llvm/ADT/APFloat.h:1043

Parameters

bool nextDown

void print(llvm::raw_ostream&) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1242

Parameters

llvm::raw_ostream&

llvm::APFloatBase::opStatus remainder(
    const llvm::APFloat& RHS)

Declared at: llvm/include/llvm/ADT/APFloat.h:1006

Parameters

const llvm::APFloat& RHS

llvm::APFloatBase::opStatus roundToIntegral(
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:1037

Parameters

llvm::APFloatBase::roundingMode RM

llvm::APFloatBase::opStatus subtract(
    const llvm::APFloat& RHS,
    llvm::APFloatBase::roundingMode RM)

Declared at: llvm/include/llvm/ADT/APFloat.h:979

Parameters

const llvm::APFloat& RHS
llvm::APFloatBase::roundingMode RM

void toString(SmallVectorImpl<char>& Str,
              unsigned int FormatPrecision = 0,
              unsigned int FormatMaxPadding = 3,
              bool TruncateZero = true) const

Declared at: llvm/include/llvm/ADT/APFloat.h:1236

Parameters

SmallVectorImpl<char>& Str
unsigned int FormatPrecision = 0
unsigned int FormatMaxPadding = 3
bool TruncateZero = true

template <typename T>
static bool usesLayout(
    const llvm::fltSemantics& Semantics)

Declared at: llvm/include/llvm/ADT/APFloat.h:796

Templates

T

Parameters

const llvm::fltSemantics& Semantics

~APFloat()

Declared at: llvm/include/llvm/ADT/APFloat.h:878