Lines Matching refs:IEEEsingle
42 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false).isSignaling());
43 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true).isSignaling());
44 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false, &payload).isSignaling());
45 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true, &payload).isSignaling());
46 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isSignaling());
47 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isSignaling());
48 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false, &payload).isSignaling());
49 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true, &payload).isSignaling());
527 M1.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &losesInfo);
561 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, MinNormalStr).isDenormal());
562 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, 0.0).isDenormal());
564 APFloat Val2(APFloat::IEEEsingle, 2.0e0);
565 APFloat T(APFloat::IEEEsingle, MinNormalStr);
1010 ASSERT_EQ(0x7fc00000, nanbits(APFloat::IEEEsingle, false, false, 0));
1011 ASSERT_EQ(0xffc00000, nanbits(APFloat::IEEEsingle, false, true, 0));
1012 ASSERT_EQ(0x7fc0ae72, nanbits(APFloat::IEEEsingle, false, false, 0xae72));
1013 ASSERT_EQ(0x7fffae72, nanbits(APFloat::IEEEsingle, false, false, 0xffffae72));
1014 ASSERT_EQ(0x7fa00000, nanbits(APFloat::IEEEsingle, true, false, 0));
1015 ASSERT_EQ(0xffa00000, nanbits(APFloat::IEEEsingle, true, true, 0));
1016 ASSERT_EQ(0x7f80ae72, nanbits(APFloat::IEEEsingle, true, false, 0xae72));
1017 ASSERT_EQ(0x7fbfae72, nanbits(APFloat::IEEEsingle, true, false, 0xffffae72));
1032 EXPECT_DEATH(APFloat(APFloat::IEEEsingle, 0.0f).convertToDouble(), "Float semantics are not IEEEdouble");
1033 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, 0.0 ).convertToFloat(), "Float semantics are not IEEEsingle");
1334 EXPECT_EQ(3.402823466e+38f, APFloat::getLargest(APFloat::IEEEsingle).convertToFloat());
1339 APFloat test = APFloat::getSmallest(APFloat::IEEEsingle, false);
1340 APFloat expected = APFloat(APFloat::IEEEsingle, "0x0.000002p-126");
1346 test = APFloat::getSmallest(APFloat::IEEEsingle, true);
1347 expected = APFloat(APFloat::IEEEsingle, "-0x0.000002p-126");
1369 APFloat test = APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
1370 APFloat expected = APFloat(APFloat::IEEEsingle, "0x1p-126");
1376 test = APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
1377 expected = APFloat(APFloat::IEEEsingle, "-0x1p-126");
1407 { &APFloat::IEEEsingle, false, {0, 0}, 1},
1408 { &APFloat::IEEEsingle, true, {0x80000000ULL, 0}, 1},
1449 test.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &losesInfo);
1470 test = APFloat::getSNaN(APFloat::IEEEsingle);
1477 test = APFloat::getQNaN(APFloat::IEEEsingle);
1534 APFloat t(APFloat::IEEEsingle, "0x1p+0");
1536 t = APFloat(APFloat::IEEEsingle, "-0x1p+0");
1539 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNegative());
1540 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle, true).isNegative());
1542 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNegative());
1543 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle, true).isNegative());
1545 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isNegative());
1546 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle, true).isNegative());
1548 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNegative());
1549 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isNegative());
1553 APFloat t(APFloat::IEEEsingle, "0x1p+0");
1556 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNormal());
1557 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNormal());
1558 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isNormal());
1559 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNormal());
1560 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isNormal());
1564 APFloat t(APFloat::IEEEsingle, "0x1p+0");
1566 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isFinite());
1567 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle, false).isFinite());
1568 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isFinite());
1569 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isFinite());
1570 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p-149").isFinite());
1574 APFloat t(APFloat::IEEEsingle, "0x1p+0");
1576 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle, false).isInfinity());
1577 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isInfinity());
1578 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isInfinity());
1579 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isInfinity());
1580 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isInfinity());
1584 APFloat t(APFloat::IEEEsingle, "0x1p+0");
1586 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNaN());
1587 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNaN());
1588 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle, false).isNaN());
1589 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNaN());
1590 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isNaN());
1595 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p+0").isFiniteNonZero());
1596 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "-0x1p+0").isFiniteNonZero());
1599 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p-149").isFiniteNonZero());
1600 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "-0x1p-149").isFiniteNonZero());
1603 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isFiniteNonZero());
1604 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, true).isFiniteNonZero());
1607 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isFiniteNonZero());
1608 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, true).isFiniteNonZero());
1612 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isFiniteNonZero());
1613 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, true).isFiniteNonZero());
1617 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isFiniteNonZero());
1618 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, true).isFiniteNonZero());
1629 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
1630 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
1631 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
1632 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
1633 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
1634 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
1635 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0");
1636 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0");
1637 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false);
1638 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true);
1639 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false);
1640 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true);
1642 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
1644 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
1901 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result);
1917 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
1918 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
1919 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
1920 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
1921 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
1922 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
1923 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0");
1924 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0");
1925 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false);
1926 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true);
1927 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false);
1928 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true);
1930 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
1932 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
2189 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result);
2205 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
2206 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
2207 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
2208 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
2209 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
2210 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
2211 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0");
2212 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0");
2213 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false);
2214 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true);
2215 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false);
2216 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true);
2218 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
2220 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
2478 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result);
2494 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
2495 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
2496 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
2497 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
2498 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
2499 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
2500 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0");
2501 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0");
2502 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false);
2503 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true);
2504 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false);
2505 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true);
2507 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
2509 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
2767 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result);
2777 APFloat One = APFloat(APFloat::IEEEsingle, "0x1p+0");
2778 APFloat Two = APFloat(APFloat::IEEEsingle, "0x2p+0");
2786 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
2787 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
2788 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
2789 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
2790 APFloat PQNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
2791 APFloat MQNaN = APFloat::getNaN(APFloat::IEEEsingle, true);
2792 APFloat PSNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
2793 APFloat MSNaN = APFloat::getSNaN(APFloat::IEEEsingle, true);
2794 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0");
2795 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0");
2796 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false);
2797 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true);
2798 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false);
2799 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true);
2801 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false);
2803 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true);
2824 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle, "0x1p+0")));
2825 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle, "-0x1p+0")));
2826 IEEEsingle, "0x1p+42")));
2827 EXPECT_EQ(-42, ilogb(APFloat(APFloat::IEEEsingle, "0x1p-42")));
2830 ilogb(APFloat::getInf(APFloat::IEEEsingle, false)));
2832 ilogb(APFloat::getInf(APFloat::IEEEsingle, true)));
2834 ilogb(APFloat::getZero(APFloat::IEEEsingle, false)));
2836 ilogb(APFloat::getZero(APFloat::IEEEsingle, true)));
2838 ilogb(APFloat::getNaN(APFloat::IEEEsingle, false)));
2840 ilogb(APFloat::getSNaN(APFloat::IEEEsingle, false)));
2842 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle, false)));
2843 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle, true)));
2844 EXPECT_EQ(-126, ilogb(APFloat::getSmallest(APFloat::IEEEsingle, false)));
2845 EXPECT_EQ(-126, ilogb(APFloat::getSmallest(APFloat::IEEEsingle, true)));
2847 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle, false)));
2849 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle, true)));
2854 APFloat(APFloat::IEEEsingle, "0x1p+0")
2855 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 0)));
2857 APFloat(APFloat::IEEEsingle, "0x1p+42")
2858 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 42)));
2860 APFloat(APFloat::IEEEsingle, "0x1p-42")
2861 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), -42)));
2863 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false);
2864 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true);
2865 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false);
2866 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true);
2867 APFloat QPNaN = APFloat::getNaN(APFloat::IEEEsingle, false);
2868 APFloat QMNaN = APFloat::getNaN(APFloat::IEEEsingle, true);
2869 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false);
2880 PInf.bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 128)));
2882 scalbn(APFloat(APFloat::IEEEsingle, "-0x1p+0"), 128)));
2884 PInf.bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+127"), 1)));
2886 scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), -127)));
2888 scalbn(APFloat(APFloat::IEEEsingle, "-0x1p+0"), -127)));
2890 scalbn(APFloat(APFloat::IEEEsingle, "0x1p-126"), -1)));
2892 scalbn(APFloat(APFloat::IEEEsingle, "0x1p-126"), -1)));