Home | History | Annotate | Download | only in Support

Lines Matching refs:APFloat

1 //===-- APFloat.cpp - Implement APFloat class -----------------------------===//
15 #include "llvm/ADT/APFloat.h"
52 const fltSemantics APFloat::IEEEhalf = { 15, -14, 11 };
53 const fltSemantics APFloat::IEEEsingle = { 127, -126, 24 };
54 const fltSemantics APFloat::IEEEdouble = { 1023, -1022, 53 };
55 const fltSemantics APFloat::IEEEquad = { 16383, -16382, 113 };
56 const fltSemantics APFloat::x87DoubleExtended = { 16383, -16382, 64 };
57 const fltSemantics APFloat::Bogus = { 0, 0, 0 };
70 const fltSemantics APFloat::PPCDoubleDouble = { 1023, -1022 + 53, 53 + 53 };
570 APFloat::initialize(const fltSemantics *ourSemantics)
581 APFloat::freeSignificand()
588 APFloat::assign(const APFloat &rhs)
600 APFloat::copySignificand(const APFloat &rhs)
612 void APFloat::makeNaN(bool SNaN, bool Negative, const APInt *fill)
655 if (semantics == &APFloat::x87DoubleExtended)
659 APFloat APFloat::makeNaN(const fltSemantics &Sem, bool SNaN, bool Negative,
661 APFloat value(Sem, uninitialized);
666 APFloat &
667 APFloat::operator=(const APFloat &rhs)
681 APFloat::isDenormal() const {
688 APFloat::bitwiseIsEqual(const APFloat &rhs) const {
711 APFloat::APFloat(const fltSemantics &ourSemantics, integerPart value) {
720 APFloat::APFloat(const fltSemantics &ourSemantics) {
726 APFloat::APFloat(const fltSemantics &ourSemantics, uninitializedTag tag) {
731 APFloat::APFloat(const fltSemantics &ourSemantics,
742 APFloat::APFloat(const fltSemantics &ourSemantics, StringRef text) {
747 APFloat::APFloat(const APFloat &rhs) {
752 APFloat::~APFloat()
757 // Profile - This method 'profiles' an APFloat for use with FoldingSet.
758 void APFloat::Profile(FoldingSetNodeID& ID) const {
763 APFloat::partCount() const
769 APFloat::semanticsPrecision(const fltSemantics &semantics)
775 APFloat::significandParts() const
777 return const_cast<APFloat *>(this)->significandParts();
781 APFloat::significandParts()
792 APFloat::zeroSignificand()
800 APFloat::incrementSignificand()
813 APFloat::addSignificand(const APFloat &rhs)
828 APFloat::subtractSignificand(const APFloat &rhs, integerPart borrow)
845 APFloat::multiplySignificand(const APFloat &rhs, const APFloat *addend)
900 APFloat extendedAddend(*addend);
938 APFloat::divideSignificand(const APFloat &rhs)
1022 APFloat::significandMSB() const
1028 APFloat::significandLSB() const
1035 APFloat::shiftSignificandRight(unsigned int bits)
1047 APFloat::shiftSignificandLeft(unsigned int bits)
1061 APFloat::cmpResult
1062 APFloat::compareAbsoluteValue(const APFloat &rhs) const
1088 APFloat::opStatus
1089 APFloat::handleOverflow(roundingMode rounding_mode)
1115 APFloat::roundAwayFromZero(roundingMode rounding_mode,
1151 APFloat::opStatus
1152 APFloat::normalize(roundingMode rounding_mode,
1259 APFloat::opStatus
1260 APFloat::addOrSubtractSpecials(const APFloat &rhs, bool subtract)
1314 APFloat::addOrSubtractSignificand(const APFloat &rhs, bool subtract)
1329 APFloat temp_rhs(rhs);
1368 APFloat temp_rhs(rhs);
1385 APFloat::opStatus
1386 APFloat::multiplySpecials(const APFloat &rhs)
1427 APFloat::opStatus
1428 APFloat::divideSpecials(const APFloat &rhs)
1469 APFloat::opStatus
1470 APFloat::modSpecials(const APFloat &rhs)
1507 APFloat::changeSign()
1514 APFloat::clearSign()
1521 APFloat::copySign(const APFloat &rhs)
1528 APFloat::opStatus
1529 APFloat::addOrSubtract(const APFloat &rhs, roundingMode rounding_mode,
1559 APFloat::opStatus
1560 APFloat::add(const APFloat &rhs, roundingMode rounding_mode)
1566 APFloat::opStatus
1567 APFloat::subtract(const APFloat &rhs, roundingMode rounding_mode)
1573 APFloat::opStatus
1574 APFloat::multiply(const APFloat &rhs, roundingMode rounding_mode)
1592 APFloat::opStatus
1593 APFloat::divide(const APFloat &rhs, roundingMode rounding_mode)
1611 APFloat::opStatus
1612 APFloat::remainder(const APFloat &rhs)
1615 APFloat V = *this;
1648 APFloat::opStatus
1649 APFloat::mod(const APFloat &rhs, roundingMode rounding_mode)
1655 APFloat V = *this;
1688 APFloat::opStatus
1689 APFloat::fusedMultiplyAdd(const APFloat &multiplicand,
1690 const APFloat &addend,
1733 APFloat::opStatus APFloat::roundToIntegral(roundingMode rounding_mode) {
1750 APFloat MagicConstant(*semantics);
1776 APFloat::cmpResult
1777 APFloat::compare(const APFloat &rhs) const
1848 /// APFloat::convert - convert a value of one floating point type to another.
1855 APFloat::opStatus
1856 APFloat::convert(const fltSemantics &toSemantics,
1871 if (&fromSemantics == &APFloat::x87DoubleExtended &&
1872 &toSemantics != &APFloat::x87DoubleExtended && category == fcNaN &&
1919 if (!X86SpecialNan && semantics == &APFloat::x87DoubleExtended)
1945 APFloat::opStatus
1946 APFloat::convertToSignExtendedInteger(integerPart *parts, unsigned int width,
2057 APFloat::opStatus
2058 APFloat::convertToInteger(integerPart *parts, unsigned int width,
2091 APFloat::opStatus
2092 APFloat::convertToInteger(APSInt &result,
2107 APFloat::opStatus
2108 APFloat::convertFromUnsignedParts(const integerPart *src,
2138 APFloat::opStatus
2139 APFloat::convertFromAPInt(const APInt &Val,
2158 APFloat::opStatus
2159 APFloat::convertFromSignExtendedInteger(const integerPart *src,
2186 APFloat::opStatus
2187 APFloat::convertFromZeroExtendedInteger(const integerPart *parts,
2203 APFloat::opStatus
2204 APFloat::convertFromHexadecimalString(StringRef s, roundingMode rounding_mode)
2293 APFloat::opStatus
2294 APFloat::roundSignificandWithExponent(const integerPart *decSigParts,
2319 APFloat decSig(calcSemantics, fcZero, sign);
2320 APFloat pow5(calcSemantics, fcZero, false);
2378 APFloat::opStatus
2379 APFloat::convertFromDecimalString(StringRef str, roundingMode rounding_mode)
2488 APFloat::opStatus
2489 APFloat::convertFromString(StringRef str, roundingMode rounding_mode)
2537 APFloat::convertToHexString(char *dst, unsigned int hexDigits,
2585 APFloat::convertNormalToHexString(char *dst, unsigned int hexDigits,
2688 hash_code llvm::hash_value(const APFloat &Arg) {
2689 if (Arg.category != APFloat::fcNormal)
2703 // Conversion from APFloat to/from host float/double. It may eventually be
2709 // Denormals have exponent minExponent in APFloat, but minExponent-1 in
2713 APFloat::convertF80LongDoubleAPFloatToAPInt() const
2745 APFloat::convertPPCDoubleDoubleAPFloatToAPInt() const
2758 // Declare fltSemantics before APFloat that uses it (and
2762 APFloat extended(*this);
2767 APFloat u(extended);
2782 APFloat v(extended);
2796 APFloat::convertQuadrupleAPFloatToAPInt() const
2832 APFloat::convertDoubleAPFloatToAPInt() const
2862 APFloat::convertFloatAPFloatToAPInt() const
2891 APFloat::convertHalfAPFloatToAPInt() const
2924 APFloat::bitcastToAPInt() const
2947 APFloat::convertToFloat() const
2956 APFloat::convertToDouble() const
2972 APFloat::initFromF80LongDoubleAPInt(const APInt &api)
2980 initialize(&APFloat::x87DoubleExtended);
3006 APFloat::initFromPPCDoubleDoubleAPInt(const APInt &api)
3022 APFloat v(IEEEdouble, APInt(64, i2));
3032 APFloat::initFromQuadrupleAPInt(const APInt &api)
3041 initialize(&APFloat::IEEEquad);
3072 APFloat::initFromDoubleAPInt(const APInt &api)
3079 initialize(&APFloat::IEEEdouble);
3105 APFloat::initFromFloatAPInt(const APInt & api)
3112 initialize(&APFloat::IEEEsingle);
3138 APFloat::initFromHalfAPInt(const APInt & api)
3145 initialize(&APFloat::IEEEhalf);
3175 APFloat::initFromAPInt(const fltSemantics* Sem, const APInt& api)
3193 APFloat
3194 APFloat::getAllOnesValue(unsigned BitWidth, bool isIEEE)
3198 return APFloat(IEEEhalf, APInt::getAllOnesValue(BitWidth));
3200 return APFloat(IEEEsingle, APInt::getAllOnesValue(BitWidth));
3202 return APFloat(IEEEdouble, APInt::getAllOnesValue(BitWidth));
3204 return APFloat(x87DoubleExtended, APInt::getAllOnesValue(BitWidth));
3207 return APFloat(IEEEquad, APInt::getAllOnesValue(BitWidth));
3208 return APFloat(PPCDoubleDouble, APInt::getAllOnesValue(BitWidth));
3214 APFloat APFloat::getLargest(const fltSemantics &Sem, bool Negative) {
3215 APFloat Val(Sem, fcNormal, Negative);
3239 APFloat APFloat::getSmallest(const fltSemantics &Sem, bool Negative) {
3240 APFloat Val(Sem, fcNormal, Negative);
3253 APFloat APFloat::getSmallestNormalized(const fltSemantics &Sem, bool Negative) {
3254 APFloat Val(Sem, fcNormal, Negative);
3269 APFloat::APFloat(const fltSemantics &Sem, const APInt &API) {
3273 APFloat::APFloat(float f) {
3277 APFloat::APFloat(double d) {
3367 void APFloat::toString(SmallVectorImpl<char> &Str,
3567 bool APFloat::getExactInverse(APFloat *inv) const {
3578 APFloat reciprocal(*semantics, 1ULL);