Home | History | Annotate | Download | only in AST

Lines Matching refs:APFloat

53 using llvm::APFloat;
368 OptionalDiagnostic &operator<<(const APFloat &F) {
753 APFloat FloatReal, FloatImag;
755 ComplexValue() : FloatReal(APFloat::Bogus), FloatImag(APFloat::Bogus) {}
759 APFloat &getComplexFloatReal() { return FloatReal; }
760 APFloat &getComplexFloatImag() { return FloatImag; }
978 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info);
1340 QualType SrcType, const APFloat &Value,
1348 if (Value.convertToInteger(Result, llvm::APFloat::rmTowardZero, &ignored)
1349 & APFloat::opInvalidOp)
1356 APFloat &Result) {
1357 APFloat Value = Result;
1360 APFloat::rmNearestTiesToEven, &ignored)
1361 & APFloat::opOverflow)
1380 QualType DestType, APFloat &Result) {
1381 Result = APFloat(Info.Ctx.getFloatTypeSemantics(DestType), 1);
1383 APFloat::rmNearestTiesToEven)
1384 & APFloat::opOverflow)
1581 APFloat &LHS, BinaryOperatorKind Opcode,
1582 const APFloat &RHS) {
1588 LHS.multiply(RHS, APFloat::rmNearestTiesToEven);
1591 LHS.add(RHS, APFloat::rmNearestTiesToEven);
1594 LHS.subtract(RHS, APFloat::rmNearestTiesToEven);
1597 LHS.divide(RHS, APFloat::rmNearestTiesToEven);
2135 bool found(APFloat &Value, QualType SubobjType) {
2195 bool found(APFloat &Value, QualType SubobjType) {
2592 bool found(APFloat &Value, QualType SubobjType) {
2744 bool found(APFloat &Value, QualType SubobjType) {
2750 APFloat One(Value.getSemantics(), 1);
2752 Value.add(One, APFloat::rmNearestTiesToEven);
2754 Value.subtract(One, APFloat::rmNearestTiesToEven);
5181 APFloat F(0.0);
5206 if (&Sem == &APFloat::x87DoubleExtended)
5214 Elts.push_back(APValue(APFloat(Sem, Elt)));
5270 llvm::APFloat f(0.0);
5275 f = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy));
5293 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy)));
5956 APFloat Val(0.0);
5961 case APFloat::fcNaN: Arg = 0; break;
5962 case APFloat::fcInfinity: Arg = 1; break;
5963 case APFloat::fcNormal: Arg = Val.isDenormal() ? 3 : 2; break;
5964 case APFloat::fcZero: Arg = 4; break;
5970 APFloat Val(0.0);
6415 APFloat::cmpResult CR_r =
6417 APFloat::cmpResult CR_i =
6421 return Success((CR_r == APFloat::cmpEqual &&
6422 CR_i == APFloat::cmpEqual), E);
6426 return Success(((CR_r == APFloat::cmpGreaterThan ||
6427 CR_r == APFloat::cmpLessThan ||
6428 CR_r == APFloat::cmpUnordered) ||
6429 (CR_i == APFloat::cmpGreaterThan ||
6430 CR_i == APFloat::cmpLessThan ||
6431 CR_i == APFloat::cmpUnordered)), E);
6448 APFloat RHS(0.0), LHS(0.0);
6457 APFloat::cmpResult CR = LHS.compare(RHS);
6463 return Success(CR == APFloat::cmpLessThan, E);
6465 return Success(CR == APFloat::cmpGreaterThan, E);
6467 return Success(CR == APFloat::cmpLessThan || CR == APFloat::cmpEqual, E);
6469 return Success(CR == APFloat::cmpGreaterThan || CR == APFloat::cmpEqual,
6472 return Success(CR == APFloat::cmpEqual, E);
6474 return Success(CR == APFloat::cmpGreaterThan
6475 || CR == APFloat::cmpLessThan
6476 || CR == APFloat::cmpUnordered, E);
7036 APFloat F(0.0);
7092 APFloat &Result;
7094 FloatExprEvaluator(EvalInfo &info, APFloat &result)
7103 Result = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(E->getType()));
7121 static bool EvaluateFloat(const Expr* E, APFloat& Result, EvalInfo &Info) {
7130 llvm::APFloat &Result) {
7145 Result = llvm::APFloat::getSNaN(Sem, false, &fill);
7147 Result = llvm::APFloat::getQNaN(Sem, false, &fill);
7164 Result = llvm::APFloat::getInf(Sem);
7203 APFloat RHS(0.);
7236 Result = llvm::APFloat::getZero(Sem);
7257 APFloat RHS(0.0);
7343 APFloat Zero = APFloat::getZero(Info.Ctx.getFloatTypeSemantics(ElemTy));
7360 APFloat &Imag = Result.FloatImag;
7364 Result.FloatReal = APFloat(Imag.getSemantics());
7438 APFloat &Real = Result.FloatReal;
7443 Result.FloatImag = APFloat(Real.getSemantics());
7533 APFloat::rmNearestTiesToEven);
7535 APFloat::rmNearestTiesToEven);
7544 APFloat::rmNearestTiesToEven);
7546 APFloat::rmNearestTiesToEven);
7555 APFloat &LHS_r = LHS.getComplexFloatReal();
7556 APFloat &LHS_i = LHS.getComplexFloatImag();
7557 APFloat &RHS_r = RHS.getComplexFloatReal();
7558 APFloat &RHS_i = RHS.getComplexFloatImag();
7560 APFloat Tmp = LHS_r;
7561 Tmp.multiply(RHS_r, APFloat::rmNearestTiesToEven);
7564 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
7565 Result.getComplexFloatReal().subtract(Tmp, APFloat::rmNearestTiesToEven);
7568 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
7571 Tmp.multiply(RHS_r, APFloat::rmNearestTiesToEven);
7572 Result.getComplexFloatImag().add(Tmp, APFloat::rmNearestTiesToEven);
7586 APFloat &LHS_r = LHS.getComplexFloatReal();
7587 APFloat &LHS_i = LHS.getComplexFloatImag();
7588 APFloat &RHS_r = RHS.getComplexFloatReal();
7589 APFloat &RHS_i = RHS.getComplexFloatImag();
7590 APFloat &Res_r = Result.getComplexFloatReal();
7591 APFloat &Res_i = Result.getComplexFloatImag();
7593 APFloat Den = RHS_r;
7594 Den.multiply(RHS_r, APFloat::rmNearestTiesToEven);
7595 APFloat Tmp = RHS_i;
7596 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
7597 Den.add(Tmp, APFloat::rmNearestTiesToEven);
7600 Res_r.multiply(RHS_r, APFloat::rmNearestTiesToEven);
7602 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
7603 Res_r.add(Tmp, APFloat::rmNearestTiesToEven);
7604 Res_r.divide(Den, APFloat::rmNearestTiesToEven);
7607 Res_i.multiply(RHS_r, APFloat::rmNearestTiesToEven);
7609 Tmp.multiply(RHS_i, APFloat::rmNearestTiesToEven);
7610 Res_i.subtract(Tmp, APFloat::rmNearestTiesToEven);
7611 Res_i.divide(Den, APFloat::rmNearestTiesToEven);
7779 llvm::APFloat F(0.0);
8352 llvm::APFloat::rmTowardZero,
8353 &Ignored) & APFloat::opInvalidOp)