reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

unittests/ADT/APFloatTest.cpp
 1347   P = T;
 1348   P.roundToIntegral(APFloat::rmTowardZero);
 1349   EXPECT_EQ(-0.0, P.convertToDouble());
 1350   P = T;
 1351   P.roundToIntegral(APFloat::rmTowardNegative);
 1352   EXPECT_EQ(-1.0, P.convertToDouble());
 1353   P = T;
 1354   P.roundToIntegral(APFloat::rmTowardPositive);
 1355   EXPECT_EQ(-0.0, P.convertToDouble());
 1356   P = T;
 1357   P.roundToIntegral(APFloat::rmNearestTiesToEven);
 1358   EXPECT_EQ(-0.0, P.convertToDouble());
 1360   P = S;
 1361   P.roundToIntegral(APFloat::rmTowardZero);
 1362   EXPECT_EQ(3.0, P.convertToDouble());
 1363   P = S;
 1364   P.roundToIntegral(APFloat::rmTowardNegative);
 1365   EXPECT_EQ(3.0, P.convertToDouble());
 1366   P = S;
 1367   P.roundToIntegral(APFloat::rmTowardPositive);
 1368   EXPECT_EQ(4.0, P.convertToDouble());
 1369   P = S;
 1370   P.roundToIntegral(APFloat::rmNearestTiesToEven);
 1371   EXPECT_EQ(3.0, P.convertToDouble());
 1373   P = R;
 1374   P.roundToIntegral(APFloat::rmTowardZero);
 1375   EXPECT_EQ(R.convertToDouble(), P.convertToDouble());
 1376   P = R;
 1377   P.roundToIntegral(APFloat::rmTowardNegative);
 1378   EXPECT_EQ(R.convertToDouble(), P.convertToDouble());
 1379   P = R;
 1380   P.roundToIntegral(APFloat::rmTowardPositive);
 1381   EXPECT_EQ(R.convertToDouble(), P.convertToDouble());
 1382   P = R;
 1383   P.roundToIntegral(APFloat::rmNearestTiesToEven);
 1384   EXPECT_EQ(R.convertToDouble(), P.convertToDouble());
 1386   P = APFloat::getZero(APFloat::IEEEdouble());
 1387   P.roundToIntegral(APFloat::rmTowardZero);
 1388   EXPECT_EQ(0.0, P.convertToDouble());
 1389   P = APFloat::getZero(APFloat::IEEEdouble(), true);
 1390   P.roundToIntegral(APFloat::rmTowardZero);
 1391   EXPECT_EQ(-0.0, P.convertToDouble());
 1392   P = APFloat::getNaN(APFloat::IEEEdouble());
 1393   P.roundToIntegral(APFloat::rmTowardZero);
 1394   EXPECT_TRUE(std::isnan(P.convertToDouble()));
 1395   P = APFloat::getInf(APFloat::IEEEdouble());
 1396   P.roundToIntegral(APFloat::rmTowardZero);
 1397   EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() > 0.0);
 1397   EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() > 0.0);
 1398   P = APFloat::getInf(APFloat::IEEEdouble(), true);
 1399   P.roundToIntegral(APFloat::rmTowardZero);
 1400   EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() < 0.0);
 1400   EXPECT_TRUE(std::isinf(P.convertToDouble()) && P.convertToDouble() < 0.0);