Lines Matching refs:APFloat
52 using llvm::APFloat;
325 OptionalDiagnostic &operator<<(const APFloat &F) {
660 APFloat FloatReal, FloatImag;
662 ComplexValue() : FloatReal(APFloat::Bogus), FloatImag(APFloat::Bogus) {}
666 APFloat &getComplexFloatReal() { return FloatReal; }
667 APFloat &getComplexFloatImag() { return FloatImag; }
893 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info);
1171 QualType SrcType, const APFloat &Value,
1179 if (Value.convertToInteger(Result, llvm::APFloat::rmTowardZero, &ignored)
1180 & APFloat::opInvalidOp)
1187 APFloat &Result) {
1188 APFloat Value = Result;
1191 APFloat::rmNearestTiesToEven, &ignored)
1192 & APFloat::opOverflow)
1211 QualType DestType, APFloat &Result) {
1212 Result = APFloat(Info.Ctx.getFloatTypeSemantics(DestType), 1);
1214 APFloat::rmNearestTiesToEven)
1215 & APFloat::opOverflow)
3682 APFloat F(0.0);
3706 bool isIEESem = &Sem != &APFloat::PPCDoubleDouble;
3708 if (&Sem == &APFloat::x87DoubleExtended)
3716 Elts.push_back(APValue(APFloat(Elt, isIEESem)));
3772 llvm::APFloat f(0.0);
3777 f = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy));
3795 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy)));
4867 APFloat::cmpResult CR_r =
4869 APFloat::cmpResult CR_i =
4873 return Success((CR_r == APFloat::cmpEqual &&
4874 CR_i == APFloat::cmpEqual), E);
4878 return Success(((CR_r == APFloat::cmpGreaterThan ||
4879 CR_r == APFloat::cmpLessThan ||
4880 CR_r == APFloat::cmpUnordered) ||
4881 (CR_i == APFloat::cmpGreaterThan ||
4882 CR_i == APFloat::cmpLessThan ||
4883 CR_i == APFloat::cmpUnordered)), E);
4900 APFloat RHS(0.0), LHS(0.0);
4909 APFloat::cmpResult CR = LHS.compare(RHS);
4915 return Success(CR == APFloat::cmpLessThan, E);
4917 return Success(CR == APFloat::cmpGreaterThan, E);
4919 return Success(CR == APFloat::cmpLessThan || CR == APFloat::cmpEqual, E);
4921 return Success(CR == APFloat::cmpGreaterThan || CR == APFloat::cmpEqual,
4924 return Success(CR == APFloat::cmpEqual, E);
4926 return Success(CR == APFloat::cmpGreaterThan
4927 || CR == APFloat::cmpLessThan
4928 || CR == APFloat::cmpUnordered, E);
5480 APFloat F(0.0);
5536 APFloat &Result;
5538 FloatExprEvaluator(EvalInfo &info, APFloat &result)
5547 Result = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(E->getType()));
5565 static bool EvaluateFloat(const Expr* E, APFloat& Result, EvalInfo &Info) {
5574 llvm::APFloat &Result) {
5589 Result = llvm::APFloat::getSNaN(Sem, false, &fill);
5591 Result = llvm::APFloat::getQNaN(Sem, false, &fill);
5608 Result = llvm::APFloat::getInf(Sem);
5643 APFloat RHS(0.);
5676 Result = llvm::APFloat::getZero(Sem);
5697 APFloat RHS(0.0);
5707 Result.multiply(RHS, APFloat::rmNearestTiesToEven);
5710 Result.add(RHS, APFloat::rmNearestTiesToEven);
5713 Result.subtract(RHS, APFloat::rmNearestTiesToEven);
5716 Result.divide(RHS, APFloat::rmNearestTiesToEven);
5803 APFloat Zero = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(ElemTy));
5820 APFloat &Imag = Result.FloatImag;
5824 Result.FloatReal = APFloat(Imag.getSemantics());
5896 APFloat &Real = Result.FloatReal;
5901 Result.FloatImag = APFloat(Real.getSemantics());
5991 APFloat::rmNearestTiesToEven);
5993 APFloat::rmNearestTiesToEven);
6002 APFloat::rmNearestTiesToEven);
6004 APFloat::rmNearestTiesToEven);
6013 APFloat &LHS_r = LHS.getComplexFloatReal();
6014 APFloat &LHS_i = LHS.getComplexFloatImag();
6015 APFloat &RHS_r = RHS.getComplexFloatReal();
6016 APFloat &RHS_i = RHS.getComplexFloatImag();
6018 APFloat Tmp = LHS_r;
6019 Tmp.multiply(RHS_r, APFloat::rmNearestTiesToEven);
6022 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
6023 Result.getComplexFloatReal().subtract(Tmp, APFloat::rmNearestTiesToEven);
6026 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
6029 Tmp.multiply(RHS_r, APFloat::rmNearestTiesToEven);
6030 Result.getComplexFloatImag().add(Tmp, APFloat::rmNearestTiesToEven);
6044 APFloat &LHS_r = LHS.getComplexFloatReal();
6045 APFloat &LHS_i = LHS.getComplexFloatImag();
6046 APFloat &RHS_r = RHS.getComplexFloatReal();
6047 APFloat &RHS_i = RHS.getComplexFloatImag();
6048 APFloat &Res_r = Result.getComplexFloatReal();
6049 APFloat &Res_i = Result.getComplexFloatImag();
6051 APFloat Den = RHS_r;
6052 Den.multiply(RHS_r, APFloat::rmNearestTiesToEven);
6053 APFloat Tmp = RHS_i;
6054 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
6055 Den.add(Tmp, APFloat::rmNearestTiesToEven);
6058 Res_r.multiply(RHS_r, APFloat::rmNearestTiesToEven);
6060 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
6061 Res_r.add(Tmp, APFloat::rmNearestTiesToEven);
6062 Res_r.divide(Den, APFloat::rmNearestTiesToEven);
6065 Res_i.multiply(RHS_r, APFloat::rmNearestTiesToEven);
6067 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
6068 Res_i.subtract(Tmp, APFloat::rmNearestTiesToEven);
6069 Res_i.divide(Den, APFloat::rmNearestTiesToEven);
6196 llvm::APFloat F(0.0);
6745 llvm::APFloat::rmTowardZero,
6746 &Ignored) & APFloat::opInvalidOp)