LLVM  6.0.0svn
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
 
opStatus convertFromString (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

int ilogb (const DoubleAPFloat &Arg)
 
DoubleAPFloat scalbn (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  roundingMode {
  rmNearestTiesToEven, rmTowardPositive, rmTowardNegative, rmTowardZero,
  rmNearestTiesToAway
}
 IEEE-754R 4.3: Rounding-direction attributes. 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 signed short ExponentType
 A signed type to represent a floating point numbers unbiased exponent. More...
 
- 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 fltSemanticsIEEEhalf () 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 const unsigned integerPartWidth = APInt::APINT_BITS_PER_WORD
 

Detailed Description

Definition at line 574 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   
)

Definition at line 3850 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and llvm::APFloatBase::uninitialized.

◆ DoubleAPFloat() [3/7]

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

Definition at line 3857 of file APFloat.cpp.

References llvm::lltok::APFloat, and assert().

◆ DoubleAPFloat() [4/7]

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

Definition at line 3863 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and llvm::APInt::getRawData().

◆ DoubleAPFloat() [5/7]

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

Definition at line 3871 of file APFloat.cpp.

References assert().

◆ DoubleAPFloat() [6/7]

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

Definition at line 3880 of file APFloat.cpp.

References llvm::lltok::APFloat, and assert().

◆ DoubleAPFloat() [7/7]

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

Definition at line 3888 of file APFloat.cpp.

References assert(), and llvm::semBogus.

Member Function Documentation

◆ add()

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

Definition at line 4033 of file APFloat.cpp.

Referenced by subtract().

◆ bitcastToAPInt()

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

◆ bitwiseIsEqual()

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

Definition at line 4257 of file APFloat.cpp.

◆ changeSign()

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

Definition at line 4180 of file APFloat.cpp.

Referenced by makeLargest(), and subtract().

◆ compare()

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

Definition at line 4249 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()

APFloat::opStatus llvm::detail::DoubleAPFloat::convertFromString ( StringRef  ,
roundingMode   
)

◆ 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

Definition at line 4335 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and bitcastToAPInt().

◆ convertToInteger()

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

Definition at line 4295 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and bitcastToAPInt().

◆ divide()

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

◆ fusedMultiplyAdd()

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

◆ getCategory()

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

◆ getExactInverse()

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

◆ getFirst() [1/2]

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

Definition at line 606 of file APFloat.h.

◆ getFirst() [2/2]

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

Definition at line 607 of file APFloat.h.

◆ getSecond() [1/2]

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

Definition at line 608 of file APFloat.h.

◆ getSecond() [2/2]

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

◆ isDenormal()

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

◆ isInteger()

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

Definition at line 4367 of file APFloat.cpp.

References assert().

◆ isLargest()

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

◆ isNegative()

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

Definition at line 4210 of file APFloat.cpp.

Referenced by isLargest(), isSmallest(), and operator=().

◆ isSmallest()

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

◆ makeInf()

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

Definition at line 4212 of file APFloat.cpp.

◆ makeLargest()

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

Definition at line 4222 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and changeSign().

Referenced by isLargest().

◆ makeNaN()

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

Definition at line 4244 of file APFloat.cpp.

Referenced by multiply(), and operator=().

◆ makeSmallest()

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

Definition at line 4230 of file APFloat.cpp.

References assert().

Referenced by isSmallest().

◆ makeSmallestNormalized()

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

Definition at line 4236 of file APFloat.cpp.

References llvm::lltok::APFloat, and assert().

◆ makeZero()

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

Definition at line 4217 of file APFloat.cpp.

◆ mod()

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

◆ multiply()

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

◆ needsCleanup()

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

Definition at line 604 of file APFloat.h.

◆ next()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 596 of file APFloat.h.

◆ remainder()

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

◆ roundToIntegral()

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

◆ subtract()

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

Definition at line 4038 of file APFloat.cpp.

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

◆ toString()

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

Definition at line 4372 of file APFloat.cpp.

References llvm::lltok::APFloat, assert(), and bitcastToAPInt().

Friends And Related Function Documentation

◆ frexp

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

Referenced by llvm::detail::frexp().

◆ hash_value

hash_code hash_value ( const DoubleAPFloat Arg)
friend

Definition at line 4262 of file APFloat.cpp.

Referenced by llvm::detail::hash_value(), and llvm::hash_value().

◆ ilogb

int ilogb ( const DoubleAPFloat Arg)
friend

◆ scalbn

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

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