FLANG
Fortran::evaluate::value::RealValueImpl Class Reference

Public Types

using R2 = Real<Integer<16>, 11>
using R3 = Real<Integer<16>, 8>
using R4 = Real<Integer<32>, 24>
using R8 = Real<Integer<64>, 53>
using R10 = Real<X87IntegerContainer, 64>
using R16 = Real<Integer<128>, 113>
using Storage = std::variant<std::monostate, R2, R3, R4, R8, R10, R16>
using Word = IntegerValue

Public Member Functions

 RealValueImpl (const RealValueImpl &)=default
 RealValueImpl (RealValueImpl &&)=default
RealValueImpl & operator= (const RealValueImpl &)=default
RealValueImpl & operator= (RealValueImpl &&)=default
 RealValueImpl (int kind, const Word &w)
 RealValueImpl (int kind, double x)
void print (llvm::raw_ostream &os) const
LLVM_DUMP_METHOD void dump () const
bool IsNull () const
int kind () const
int bits () const
std::size_t bytesStored () const
bool IsZero () const
bool operator== (const RealValueImpl &y) const
bool operator!= (const RealValueImpl &y) const
bool IsNegative () const
bool IsNotANumber () const
bool IsSignalingNaN () const
bool IsInfinite () const
bool IsFinite () const
bool IsNormal () const
int Exponent () const
void StoreRawBytes (void *dst, size_t size, bool *changed) const
IntegerValue RawBits () const
Relation Compare (const RealValueImpl &y) const
RealValueImpl ABS () const
RealValueImpl Negate () const
RealValueImpl SIGN (const RealValueImpl &x) const
RealValueImpl SetSign (bool toNegative) const
RealValueImpl FlushSubnormalToZero () const
ValueWithRealFlags< RealValueImpl > Add (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > Subtract (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > Multiply (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > Divide (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > SQRT (Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > HYPOT (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > MOD (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > MODULO (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > DIM (const RealValueImpl &y, Rounding rounding=TargetCharacteristics::defaultRounding) const
RealValueImpl FRACTION () const
RealValueImpl RRSPACING () const
RealValueImpl SPACING () const
RealValueImpl SET_EXPONENT (std::int64_t e) const
ValueWithRealFlags< RealValueImpl > NEAREST (bool upward) const
ValueWithRealFlags< RealValueImpl > ToWholeNumber (common::RoundingMode mode=common::RoundingMode::ToZero) const
ValueWithRealFlags< IntegerValue > ToInteger (common::RoundingMode mode=common::RoundingMode::ToZero, int toBits=0) const
ValueWithRealFlags< RealValueImpl > SCALE (const IntegerValue &by, Rounding rounding=TargetCharacteristics::defaultRounding) const
ValueWithRealFlags< RealValueImpl > KahanSummation (const RealValueImpl &y, RealValueImpl &correction, Rounding rounding=TargetCharacteristics::defaultRounding) const
IntegerValue EXPONENT () const
std::string DumpHexadecimal () const
llvm::raw_ostream & AsFortran (llvm::raw_ostream &o, int kind, bool minimal=false) const
template<typename T>
T GetWord () const
template<typename F>
auto WithWord (F &&f) const

Static Public Member Functions

static RealValueImpl Zero (int kind)
template<typename T>
static RealValueImpl FromWord (const T &r)
template<typename T>
static ValueWithRealFlags< RealValueImpl > FromWord (const ValueWithRealFlags< T > &x)
static RealValueImpl FromRawBytes (int kind, const void *raw, std::size_t expectedSize)
static constexpr std::size_t bytesStored (int kind)
static int DIGITS (int kind)
static int PRECISION (int kind)
static int RANGE (int kind)
static int MAXEXPONENT (int kind)
static int MINEXPONENT (int kind)
static RealValueImpl HUGE (int kind)
static RealValueImpl EPSILON (int kind)
static RealValueImpl TINY (int kind)
static RealValueImpl NotANumber (int kind)
static RealValueImpl Infinity (int kind, bool negative=false)
static RealValueImpl NegativeZero (int kind)
static ValueWithRealFlags< RealValueImpl > FromInteger (int kind, const IntegerValue &n, bool isUnsigned=false, Rounding rounding=TargetCharacteristics::defaultRounding)
static ValueWithRealFlags< RealValueImpl > Convert (int kind, const RealValueImpl &from, Rounding rounding=TargetCharacteristics::defaultRounding)
static ValueWithRealFlags< RealValueImpl > Read (int kind, const char *&pp, Rounding rounding=TargetCharacteristics::defaultRounding)
template<typename F>
static auto WithWordProto (int kind, F &&f)

Member Function Documentation

◆ GetWord()

template<typename T>
T Fortran::evaluate::value::RealValueImpl::GetWord ( ) const
inline

Return a word of the requested type (value::Real<INT,PREC>). The current stored word must match that type or we crash.


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