LLVM  13.0.0git
Public Member Functions | Friends | List of all members
llvm::detail::DoubleAPFloat Class Referencefinal

#include "llvm/ADT/APFloat.h"

Inheritance diagram for llvm::detail::DoubleAPFloat:
Inheritance graph
[legend]
Collaboration diagram for llvm::detail::DoubleAPFloat:
Collaboration graph
[legend]

Public Member Functions

 DoubleAPFloat (const fltSemantics &S)
 
 DoubleAPFloat (const fltSemantics &S, uninitializedTag)
 
 DoubleAPFloat (const fltSemantics &S, integerPart)
 
 DoubleAPFloat (const fltSemantics &S, const APInt &I)
 
 DoubleAPFloat (const fltSemantics &S, APFloat &&First, APFloat &&Second)
 
 DoubleAPFloat (const DoubleAPFloat &RHS)
 
 DoubleAPFloat (DoubleAPFloat &&RHS)
 
DoubleAPFloatoperator= (const DoubleAPFloat &RHS)
 
DoubleAPFloatoperator= (DoubleAPFloat &&RHS)
 
bool needsCleanup () const
 
APFloatgetFirst ()
 
const APFloatgetFirst () const
 
APFloatgetSecond ()
 
const APFloatgetSecond () const
 
opStatus add (const DoubleAPFloat &RHS, roundingMode RM)
 
opStatus subtract (const DoubleAPFloat &RHS, roundingMode RM)
 
opStatus multiply (const DoubleAPFloat &RHS, roundingMode RM)
 
opStatus divide (const DoubleAPFloat &RHS, roundingMode RM)
 
opStatus remainder (const DoubleAPFloat &RHS)
 
opStatus mod (const DoubleAPFloat &RHS)
 
opStatus fusedMultiplyAdd (const DoubleAPFloat &Multiplicand, const DoubleAPFloat &Addend, roundingMode RM)
 
opStatus roundToIntegral (roundingMode RM)
 
void changeSign ()
 
cmpResult compareAbsoluteValue (const DoubleAPFloat &RHS) const
 
fltCategory getCategory () const
 
bool isNegative () const
 
void makeInf (bool Neg)
 
void makeZero (bool Neg)
 
void makeLargest (bool Neg)
 
void makeSmallest (bool Neg)
 
void makeSmallestNormalized (bool Neg)
 
void makeNaN (bool SNaN, bool Neg, const APInt *fill)
 
cmpResult compare (const DoubleAPFloat &RHS) const
 
bool bitwiseIsEqual (const DoubleAPFloat &RHS) const
 
APInt bitcastToAPInt () const
 
Expected< opStatusconvertFromString (StringRef, roundingMode)
 
opStatus next (bool nextDown)
 
opStatus convertToInteger (MutableArrayRef< integerPart > Input, unsigned int Width, bool IsSigned, roundingMode RM, bool *IsExact) const
 
opStatus convertFromAPInt (const APInt &Input, bool IsSigned, roundingMode RM)
 
opStatus convertFromSignExtendedInteger (const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
 
opStatus convertFromZeroExtendedInteger (const integerPart *Input, unsigned int InputSize, bool IsSigned, roundingMode RM)
 
unsigned int convertToHexString (char *DST, unsigned int HexDigits, bool UpperCase, roundingMode RM) const
 
bool isDenormal () const
 
bool isSmallest () const
 
bool isLargest () const
 
bool isInteger () const
 
void toString (SmallVectorImpl< char > &Str, unsigned FormatPrecision, unsigned FormatMaxPadding, bool TruncateZero=true) const
 
bool getExactInverse (APFloat *inv) const
 

Friends

DoubleAPFloat scalbn (const DoubleAPFloat &X, int Exp, roundingMode)
 
DoubleAPFloat frexp (const DoubleAPFloat &X, int &Exp, roundingMode)
 
hash_code hash_value (const DoubleAPFloat &Arg)
 

Additional Inherited Members

- Public Types inherited from llvm::APFloatBase
enum  cmpResult { cmpLessThan, cmpEqual, cmpGreaterThan, cmpUnordered }
 IEEE-754R 5.11: Floating Point Comparison Relations. More...
 
enum  opStatus {
  opOK = 0x00, opInvalidOp = 0x01, opDivByZero = 0x02, opOverflow = 0x04,
  opUnderflow = 0x08, opInexact = 0x10
}
 IEEE-754R 7: Default exception handling. More...
 
enum  fltCategory { fcInfinity, fcNaN, fcNormal, fcZero }
 Category of internally-represented number. More...
 
enum  uninitializedTag { uninitialized }
 Convenience enum used to construct an uninitialized APFloat. More...
 
enum  IlogbErrorKinds { IEK_Zero = INT_MIN + 1, IEK_NaN = INT_MIN, IEK_Inf = INT_MAX }
 Enumeration of ilogb error results. More...
 
typedef APInt::WordType integerPart
 
typedef int32_t ExponentType
 A signed type to represent a floating point numbers unbiased exponent. More...
 
using roundingMode = llvm::RoundingMode
 IEEE-754R 4.3: Rounding-direction attributes. More...
 
enum  Semantics {
  S_IEEEhalf, S_BFloat, S_IEEEsingle, S_IEEEdouble,
  S_x87DoubleExtended, S_IEEEquad, S_PPCDoubleDouble
}
 
- Static Public Member Functions inherited from llvm::APFloatBase
static unsigned int semanticsPrecision (const fltSemantics &)
 
static ExponentType semanticsMinExponent (const fltSemantics &)
 
static ExponentType semanticsMaxExponent (const fltSemantics &)
 
static unsigned int semanticsSizeInBits (const fltSemantics &)
 
static unsigned getSizeInBits (const fltSemantics &Sem)
 Returns the size of the floating point number (in bits) in the given semantics. More...
 
static const llvm::fltSemanticsEnumToSemantics (Semantics S)
 
static Semantics SemanticsToEnum (const llvm::fltSemantics &Sem)
 
static const fltSemanticsIEEEhalf () LLVM_READNONE
 
static const fltSemanticsBFloat () LLVM_READNONE
 
static const fltSemanticsIEEEsingle () LLVM_READNONE
 
static const fltSemanticsIEEEdouble () LLVM_READNONE
 
static const fltSemanticsIEEEquad () LLVM_READNONE
 
static const fltSemanticsPPCDoubleDouble () LLVM_READNONE
 
static const fltSemanticsx87DoubleExtended () LLVM_READNONE
 
static const fltSemanticsBogus () LLVM_READNONE
 A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real. More...
 
- Static Public Attributes inherited from llvm::APFloatBase
static constexpr unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD
 
static constexpr roundingMode rmNearestTiesToEven
 
static constexpr roundingMode rmTowardPositive = RoundingMode::TowardPositive
 
static constexpr roundingMode rmTowardNegative = RoundingMode::TowardNegative
 
static constexpr roundingMode rmTowardZero = RoundingMode::TowardZero
 
static constexpr roundingMode rmNearestTiesToAway
 

Detailed Description

Definition at line 602 of file APFloat.h.

Constructor & Destructor Documentation

◆ DoubleAPFloat() [1/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const fltSemantics S)

◆ DoubleAPFloat() [2/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const fltSemantics S,
uninitializedTag   
)

◆ DoubleAPFloat() [3/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const fltSemantics S,
integerPart  I 
)

Definition at line 4229 of file APFloat.cpp.

References llvm::lltok::APFloat, I, and llvm::semIEEEdouble.

◆ DoubleAPFloat() [4/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const fltSemantics S,
const APInt I 
)

Definition at line 4235 of file APFloat.cpp.

References llvm::lltok::APFloat, I, and llvm::semIEEEdouble.

◆ DoubleAPFloat() [5/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const fltSemantics S,
APFloat &&  First,
APFloat &&  Second 
)

Definition at line 4243 of file APFloat.cpp.

References First, and move.

◆ DoubleAPFloat() [6/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( const DoubleAPFloat RHS)

Definition at line 4252 of file APFloat.cpp.

References llvm::lltok::APFloat.

◆ DoubleAPFloat() [7/7]

llvm::detail::DoubleAPFloat::DoubleAPFloat ( DoubleAPFloat &&  RHS)

Definition at line 4260 of file APFloat.cpp.

References assert(), llvm::semBogus, and llvm::semPPCDoubleDouble.

Member Function Documentation

◆ add()

APFloat::opStatus llvm::detail::DoubleAPFloat::add ( const DoubleAPFloat RHS,
roundingMode  RM 
)

Definition at line 4405 of file APFloat.cpp.

References llvm::AArch64::RM.

Referenced by subtract().

◆ bitcastToAPInt()

APInt llvm::detail::DoubleAPFloat::bitcastToAPInt ( ) const

◆ bitwiseIsEqual()

bool llvm::detail::DoubleAPFloat::bitwiseIsEqual ( const DoubleAPFloat RHS) const

Definition at line 4629 of file APFloat.cpp.

◆ changeSign()

void llvm::detail::DoubleAPFloat::changeSign ( )

Definition at line 4552 of file APFloat.cpp.

Referenced by makeLargest(), and subtract().

◆ compare()

APFloat::cmpResult llvm::detail::DoubleAPFloat::compare ( const DoubleAPFloat RHS) const

Definition at line 4621 of file APFloat.cpp.

References llvm::APFloatBase::cmpEqual.

Referenced by isLargest(), and isSmallest().

◆ compareAbsoluteValue()

APFloat::cmpResult llvm::detail::DoubleAPFloat::compareAbsoluteValue ( const DoubleAPFloat RHS) const

◆ convertFromAPInt()

APFloat::opStatus llvm::detail::DoubleAPFloat::convertFromAPInt ( const APInt Input,
bool  IsSigned,
roundingMode  RM 
)

◆ convertFromSignExtendedInteger()

APFloat::opStatus llvm::detail::DoubleAPFloat::convertFromSignExtendedInteger ( const integerPart Input,
unsigned int  InputSize,
bool  IsSigned,
roundingMode  RM 
)

◆ convertFromString()

Expected< APFloat::opStatus > llvm::detail::DoubleAPFloat::convertFromString ( StringRef  S,
roundingMode  RM 
)

◆ convertFromZeroExtendedInteger()

APFloat::opStatus llvm::detail::DoubleAPFloat::convertFromZeroExtendedInteger ( const integerPart Input,
unsigned int  InputSize,
bool  IsSigned,
roundingMode  RM 
)

◆ convertToHexString()

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

◆ convertToInteger()

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

◆ divide()

APFloat::opStatus llvm::detail::DoubleAPFloat::divide ( const DoubleAPFloat RHS,
APFloat::roundingMode  RM 
)

◆ fusedMultiplyAdd()

APFloat::opStatus llvm::detail::DoubleAPFloat::fusedMultiplyAdd ( const DoubleAPFloat Multiplicand,
const DoubleAPFloat Addend,
APFloat::roundingMode  RM 
)

◆ getCategory()

APFloat::fltCategory llvm::detail::DoubleAPFloat::getCategory ( ) const

Definition at line 4578 of file APFloat.cpp.

Referenced by isDenormal(), isLargest(), isSmallest(), and multiply().

◆ getExactInverse()

bool llvm::detail::DoubleAPFloat::getExactInverse ( APFloat inv) const

◆ getFirst() [1/2]

APFloat& llvm::detail::DoubleAPFloat::getFirst ( )
inline

Definition at line 634 of file APFloat.h.

◆ getFirst() [2/2]

const APFloat& llvm::detail::DoubleAPFloat::getFirst ( ) const
inline

Definition at line 635 of file APFloat.h.

◆ getSecond() [1/2]

APFloat& llvm::detail::DoubleAPFloat::getSecond ( )
inline

Definition at line 636 of file APFloat.h.

◆ getSecond() [2/2]

const APFloat& llvm::detail::DoubleAPFloat::getSecond ( ) const
inline

Definition at line 637 of file APFloat.h.

◆ isDenormal()

bool llvm::detail::DoubleAPFloat::isDenormal ( ) const

Definition at line 4716 of file APFloat.cpp.

References llvm::APFloatBase::fcNormal, and getCategory().

◆ isInteger()

bool llvm::detail::DoubleAPFloat::isInteger ( ) const

Definition at line 4739 of file APFloat.cpp.

References assert(), and llvm::semPPCDoubleDouble.

◆ isLargest()

bool llvm::detail::DoubleAPFloat::isLargest ( ) const

◆ isNegative()

bool llvm::detail::DoubleAPFloat::isNegative ( ) const

Definition at line 4582 of file APFloat.cpp.

Referenced by isLargest(), and isSmallest().

◆ isSmallest()

bool llvm::detail::DoubleAPFloat::isSmallest ( ) const

◆ makeInf()

void llvm::detail::DoubleAPFloat::makeInf ( bool  Neg)

Definition at line 4584 of file APFloat.cpp.

◆ makeLargest()

void llvm::detail::DoubleAPFloat::makeLargest ( bool  Neg)

◆ makeNaN()

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

Definition at line 4616 of file APFloat.cpp.

◆ makeSmallest()

void llvm::detail::DoubleAPFloat::makeSmallest ( bool  Neg)

Definition at line 4602 of file APFloat.cpp.

References assert(), and llvm::semPPCDoubleDouble.

Referenced by isSmallest().

◆ makeSmallestNormalized()

void llvm::detail::DoubleAPFloat::makeSmallestNormalized ( bool  Neg)

◆ makeZero()

void llvm::detail::DoubleAPFloat::makeZero ( bool  Neg)

Definition at line 4589 of file APFloat.cpp.

◆ mod()

APFloat::opStatus llvm::detail::DoubleAPFloat::mod ( const DoubleAPFloat RHS)

◆ multiply()

APFloat::opStatus llvm::detail::DoubleAPFloat::multiply ( const DoubleAPFloat RHS,
APFloat::roundingMode  RM 
)

◆ needsCleanup()

bool llvm::detail::DoubleAPFloat::needsCleanup ( ) const
inline

Definition at line 632 of file APFloat.h.

◆ next()

APFloat::opStatus llvm::detail::DoubleAPFloat::next ( bool  nextDown)

◆ operator=() [1/2]

DoubleAPFloat & llvm::detail::DoubleAPFloat::operator= ( const DoubleAPFloat RHS)

Definition at line 4266 of file APFloat.cpp.

References DoubleAPFloat().

◆ operator=() [2/2]

DoubleAPFloat& llvm::detail::DoubleAPFloat::operator= ( DoubleAPFloat &&  RHS)
inline

Definition at line 624 of file APFloat.h.

References DoubleAPFloat(), and move.

◆ remainder()

APFloat::opStatus llvm::detail::DoubleAPFloat::remainder ( const DoubleAPFloat RHS)

◆ roundToIntegral()

APFloat::opStatus llvm::detail::DoubleAPFloat::roundToIntegral ( APFloat::roundingMode  RM)

◆ subtract()

APFloat::opStatus llvm::detail::DoubleAPFloat::subtract ( const DoubleAPFloat RHS,
roundingMode  RM 
)

Definition at line 4410 of file APFloat.cpp.

References add(), changeSign(), llvm::MipsISD::Ret, and llvm::AArch64::RM.

◆ toString()

void llvm::detail::DoubleAPFloat::toString ( SmallVectorImpl< char > &  Str,
unsigned  FormatPrecision,
unsigned  FormatMaxPadding,
bool  TruncateZero = true 
) const

Friends And Related Function Documentation

◆ frexp

DoubleAPFloat frexp ( const DoubleAPFloat X,
int Exp,
roundingMode   
)
friend

◆ hash_value

hash_code hash_value ( const DoubleAPFloat Arg)
friend

Definition at line 4634 of file APFloat.cpp.

◆ scalbn

DoubleAPFloat scalbn ( const DoubleAPFloat X,
int  Exp,
roundingMode   
)
friend

The documentation for this class was generated from the following files: