LLVM 22.0.0git
APFloat.h File Reference

This file declares a class to represent arbitrary precision floating point values and provide a variety of arithmetic operations on them. More...

Go to the source code of this file.

Classes

struct  llvm::APFloatBase
 A self-contained host- and target-independent arbitrary-precision floating-point software implementation. More...
class  llvm::detail::IEEEFloat
class  llvm::detail::DoubleAPFloat
class  llvm::APFloat

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::detail
 These are wrappers over isa* function that allow them to be used in generic algorithms such as llvm:all_of, llvm::none_of, etc.

Macros

#define APFLOAT_DISPATCH_ON_SEMANTICS(METHOD_CALL)

Typedefs

using llvm::detail::integerPart = APFloatBase::integerPart
using llvm::detail::uninitializedTag = APFloatBase::uninitializedTag
using llvm::detail::roundingMode = APFloatBase::roundingMode
using llvm::detail::opStatus = APFloatBase::opStatus
using llvm::detail::cmpResult = APFloatBase::cmpResult
using llvm::detail::fltCategory = APFloatBase::fltCategory
using llvm::detail::ExponentType = APFloatBase::ExponentType

Enumerations

enum  llvm::lostFraction { llvm::lfExactlyZero , llvm::lfLessThanHalf , llvm::lfExactlyHalf , llvm::lfMoreThanHalf }
 Enum that represents what fraction of the LSB truncated bits of an fp number represent. More...

Functions

LLVM_ABI hash_code llvm::detail::hash_value (const IEEEFloat &Arg)
LLVM_ABI int llvm::detail::ilogb (const IEEEFloat &Arg)
LLVM_ABI IEEEFloat llvm::detail::scalbn (IEEEFloat X, int Exp, roundingMode RoundingMode)
LLVM_ABI IEEEFloat llvm::detail::frexp (const IEEEFloat &Val, int &Exp, roundingMode RM)
LLVM_ABI hash_code llvm::detail::hash_value (const DoubleAPFloat &Arg)
LLVM_ABI DoubleAPFloat llvm::detail::scalbn (const DoubleAPFloat &Arg, int Exp, roundingMode RM)
LLVM_ABI DoubleAPFloat llvm::detail::frexp (const DoubleAPFloat &X, int &Exp, roundingMode)
LLVM_ABI hash_code llvm::hash_value (const APFloat &Arg)
 See friend declarations above.
int llvm::ilogb (const APFloat &Arg)
 Returns the exponent of the internal representation of the APFloat.
APFloat llvm::scalbn (APFloat X, int Exp, APFloat::roundingMode RM)
 Returns: X * 2^Exp for integral exponents.
APFloat llvm::frexp (const APFloat &X, int &Exp, APFloat::roundingMode RM)
 Equivalent of C standard library function.
APFloat llvm::abs (APFloat X)
 Returns the absolute value of the argument.
APFloat llvm::neg (APFloat X)
 Returns the negated value of the argument.
LLVM_READONLY APFloat llvm::minnum (const APFloat &A, const APFloat &B)
 Implements IEEE-754 2008 minNum semantics.
LLVM_READONLY APFloat llvm::maxnum (const APFloat &A, const APFloat &B)
 Implements IEEE-754 2008 maxNum semantics.
LLVM_READONLY APFloat llvm::minimum (const APFloat &A, const APFloat &B)
 Implements IEEE 754-2019 minimum semantics.
LLVM_READONLY APFloat llvm::minimumnum (const APFloat &A, const APFloat &B)
 Implements IEEE 754-2019 minimumNumber semantics.
LLVM_READONLY APFloat llvm::maximum (const APFloat &A, const APFloat &B)
 Implements IEEE 754-2019 maximum semantics.
LLVM_READONLY APFloat llvm::maximumnum (const APFloat &A, const APFloat &B)
 Implements IEEE 754-2019 maximumNumber semantics.
raw_ostreamllvm::operator<< (raw_ostream &OS, const APFloat &V)

Variables

static constexpr uninitializedTag llvm::detail::uninitialized = APFloatBase::uninitialized
static constexpr roundingMode llvm::detail::rmNearestTiesToEven
static constexpr roundingMode llvm::detail::rmNearestTiesToAway
static constexpr roundingMode llvm::detail::rmTowardNegative = APFloatBase::rmTowardNegative
static constexpr roundingMode llvm::detail::rmTowardPositive = APFloatBase::rmTowardPositive
static constexpr roundingMode llvm::detail::rmTowardZero = APFloatBase::rmTowardZero
static constexpr unsigned llvm::detail::integerPartWidth = APFloatBase::integerPartWidth
static constexpr cmpResult llvm::detail::cmpEqual = APFloatBase::cmpEqual
static constexpr cmpResult llvm::detail::cmpLessThan = APFloatBase::cmpLessThan
static constexpr cmpResult llvm::detail::cmpGreaterThan = APFloatBase::cmpGreaterThan
static constexpr cmpResult llvm::detail::cmpUnordered = APFloatBase::cmpUnordered
static constexpr opStatus llvm::detail::opOK = APFloatBase::opOK
static constexpr opStatus llvm::detail::opInvalidOp = APFloatBase::opInvalidOp
static constexpr opStatus llvm::detail::opDivByZero = APFloatBase::opDivByZero
static constexpr opStatus llvm::detail::opOverflow = APFloatBase::opOverflow
static constexpr opStatus llvm::detail::opUnderflow = APFloatBase::opUnderflow
static constexpr opStatus llvm::detail::opInexact = APFloatBase::opInexact
static constexpr fltCategory llvm::detail::fcInfinity = APFloatBase::fcInfinity
static constexpr fltCategory llvm::detail::fcNaN = APFloatBase::fcNaN
static constexpr fltCategory llvm::detail::fcNormal = APFloatBase::fcNormal
static constexpr fltCategory llvm::detail::fcZero = APFloatBase::fcZero

Detailed Description

This file declares a class to represent arbitrary precision floating point values and provide a variety of arithmetic operations on them.

Definition in file APFloat.h.

Macro Definition Documentation

◆ APFLOAT_DISPATCH_ON_SEMANTICS

#define APFLOAT_DISPATCH_ON_SEMANTICS ( METHOD_CALL)