Lines Matching defs:APFloat
18 #include "llvm/ADT/APFloat.h"
23 using APFloat = llvm::APFloat;
29 APFloat F;
34 Floating(const APFloat &F) : F(F) {}
38 return Floating(APFloat::getInf(Sem));
40 const APFloat &getAPFloat() const { return F; }
50 APFloat::opStatus convertToInteger(APSInt &Result) const {
52 return F.convertToInteger(Result, llvm::APFloat::rmTowardZero, &IsExact);
57 APFloat Copy = F;
74 // Can't use APFloat::print() since it appends a newline.
102 APFloat::fltCategory getCategory() const { return F.getCategory(); }
119 static APFloat::opStatus fromIntegral(APSInt Val,
123 APFloat F = APFloat(Sem);
124 APFloat::opStatus Status = F.convertFromAPInt(Val, Val.isSigned(), RM);
131 size_t Size = APFloat::semanticsSizeInBits(Sem);
135 return Floating(APFloat(Sem, API));
141 (APFloat::semanticsSizeInBits(F.getSemantics()) / 8);
160 APFloat V = F.F;
168 static APFloat::opStatus add(const Floating &A, const Floating &B,
174 static APFloat::opStatus increment(const Floating &A, llvm::RoundingMode RM,
176 APFloat One(A.F.getSemantics(), 1);
181 static APFloat::opStatus sub(const Floating &A, const Floating &B,
187 static APFloat::opStatus decrement(const Floating &A, llvm::RoundingMode RM,
189 APFloat One(A.F.getSemantics(), 1);
194 static APFloat::opStatus mul(const Floating &A, const Floating &B,
200 static APFloat::opStatus div(const Floating &A, const Floating &B,