Lines Matching refs:APFloat
23 llvm::APFloat F(0.0); in convertToDoubleFromString()
24 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString()
30 llvm::APFloat F(d); in convertToString()
42 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST()
43 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST()
44 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST()
45 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle, true, &payload).isSignaling()); in TEST()
46 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isSignaling()); in TEST()
47 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isSignaling()); in TEST()
48 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false, &payload).isSignaling()); in TEST()
49 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true, &payload).isSignaling()); in TEST()
54 APFloat test(APFloat::IEEEquad, APFloat::uninitialized); in TEST()
55 APFloat expected(APFloat::IEEEquad, APFloat::uninitialized); in TEST()
73 test = APFloat::getInf(APFloat::IEEEquad, false); in TEST()
74 expected = APFloat::getInf(APFloat::IEEEquad, false); in TEST()
75 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
81 test = APFloat::getInf(APFloat::IEEEquad, false); in TEST()
82 expected = APFloat::getLargest(APFloat::IEEEquad, false); in TEST()
83 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
88 test = APFloat::getInf(APFloat::IEEEquad, true); in TEST()
89 expected = APFloat::getLargest(APFloat::IEEEquad, true); in TEST()
90 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
95 test = APFloat::getInf(APFloat::IEEEquad, true); in TEST()
96 expected = APFloat::getInf(APFloat::IEEEquad, true); in TEST()
97 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
102 test = APFloat::getLargest(APFloat::IEEEquad, false); in TEST()
103 expected = APFloat::getInf(APFloat::IEEEquad, false); in TEST()
104 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
111 test = APFloat::getLargest(APFloat::IEEEquad, false); in TEST()
112 expected = APFloat(APFloat::IEEEquad, in TEST()
114 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
119 test = APFloat::getLargest(APFloat::IEEEquad, true); in TEST()
120 expected = APFloat(APFloat::IEEEquad, in TEST()
122 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
126 test = APFloat::getLargest(APFloat::IEEEquad, true); in TEST()
127 expected = APFloat::getInf(APFloat::IEEEquad, true); in TEST()
128 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
133 test = APFloat(APFloat::IEEEquad, "0x0.0000000000000000000000000001p-16382"); in TEST()
134 expected = APFloat(APFloat::IEEEquad, in TEST()
136 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
140 test = APFloat(APFloat::IEEEquad, "0x0.0000000000000000000000000001p-16382"); in TEST()
141 expected = APFloat::getZero(APFloat::IEEEquad, false); in TEST()
142 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
147 test = APFloat(APFloat::IEEEquad, "-0x0.0000000000000000000000000001p-16382"); in TEST()
148 expected = APFloat::getZero(APFloat::IEEEquad, true); in TEST()
149 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
154 test = APFloat(APFloat::IEEEquad, "-0x0.0000000000000000000000000001p-16382"); in TEST()
155 expected = APFloat(APFloat::IEEEquad, in TEST()
157 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
161 test = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
162 expected = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
163 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
167 test = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
168 expected = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
169 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
173 test = APFloat::getSNaN(APFloat::IEEEquad, false); in TEST()
174 expected = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
175 EXPECT_EQ(test.next(false), APFloat::opInvalidOp); in TEST()
179 test = APFloat::getSNaN(APFloat::IEEEquad, false); in TEST()
180 expected = APFloat::getQNaN(APFloat::IEEEquad, false); in TEST()
181 EXPECT_EQ(test.next(true), APFloat::opInvalidOp); in TEST()
185 test = APFloat::getZero(APFloat::IEEEquad, false); in TEST()
186 expected = APFloat::getSmallest(APFloat::IEEEquad, false); in TEST()
187 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
191 test = APFloat::getZero(APFloat::IEEEquad, false); in TEST()
192 expected = APFloat::getSmallest(APFloat::IEEEquad, true); in TEST()
193 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
197 test = APFloat::getZero(APFloat::IEEEquad, true); in TEST()
198 expected = APFloat::getSmallest(APFloat::IEEEquad, false); in TEST()
199 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
203 test = APFloat::getZero(APFloat::IEEEquad, true); in TEST()
204 expected = APFloat::getSmallest(APFloat::IEEEquad, true); in TEST()
205 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
217 test = APFloat(APFloat::IEEEquad, "0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
218 expected = APFloat(APFloat::IEEEquad, in TEST()
220 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
225 test = APFloat(APFloat::IEEEquad, in TEST()
227 expected = APFloat(APFloat::IEEEquad, in TEST()
229 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
234 test = APFloat(APFloat::IEEEquad, in TEST()
236 expected = APFloat(APFloat::IEEEquad, in TEST()
238 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
243 test = APFloat(APFloat::IEEEquad, in TEST()
245 expected = APFloat(APFloat::IEEEquad, in TEST()
247 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
258 test = APFloat(APFloat::IEEEquad, "-0x1p+1"); in TEST()
259 expected = APFloat(APFloat::IEEEquad, in TEST()
261 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
265 test = APFloat(APFloat::IEEEquad, "0x1p+1"); in TEST()
266 expected = APFloat(APFloat::IEEEquad, "0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
267 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
271 test = APFloat(APFloat::IEEEquad, "0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
272 expected = APFloat(APFloat::IEEEquad, "0x1p+1"); in TEST()
273 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
277 test = APFloat(APFloat::IEEEquad, "-0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
278 expected = APFloat(APFloat::IEEEquad, "-0x1p+1"); in TEST()
279 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
294 test = APFloat(APFloat::IEEEquad, "-0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
295 expected = APFloat(APFloat::IEEEquad, in TEST()
297 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
303 test = APFloat(APFloat::IEEEquad, "0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
304 expected = APFloat(APFloat::IEEEquad, in TEST()
306 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
312 test = APFloat(APFloat::IEEEquad, "0x1.0000000000000000000000000000p-16382"); in TEST()
313 expected = APFloat(APFloat::IEEEquad, in TEST()
315 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
321 test = APFloat(APFloat::IEEEquad, "-0x1.0000000000000000000000000000p-16382"); in TEST()
322 expected = APFloat(APFloat::IEEEquad, in TEST()
324 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
339 test = APFloat(APFloat::IEEEquad, "-0x1p-16381"); in TEST()
340 expected = APFloat(APFloat::IEEEquad, in TEST()
342 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
347 test = APFloat(APFloat::IEEEquad, "-0x1.ffffffffffffffffffffffffffffp-16382"); in TEST()
348 expected = APFloat(APFloat::IEEEquad, "-0x1p-16381"); in TEST()
349 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
353 test = APFloat(APFloat::IEEEquad, "0x1.ffffffffffffffffffffffffffffp-16382"); in TEST()
354 expected = APFloat(APFloat::IEEEquad, "0x1p-16381"); in TEST()
355 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
359 test = APFloat(APFloat::IEEEquad, "0x1p-16381"); in TEST()
360 expected = APFloat(APFloat::IEEEquad, in TEST()
362 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
377 test = APFloat(APFloat::IEEEquad, in TEST()
379 expected = APFloat(APFloat::IEEEquad, in TEST()
381 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
387 test = APFloat(APFloat::IEEEquad, in TEST()
389 expected = APFloat(APFloat::IEEEquad, in TEST()
391 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
397 test = APFloat(APFloat::IEEEquad, in TEST()
399 expected = APFloat(APFloat::IEEEquad, in TEST()
401 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
407 test = APFloat(APFloat::IEEEquad, in TEST()
409 expected = APFloat(APFloat::IEEEquad, in TEST()
411 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
417 test = APFloat(APFloat::IEEEquad, in TEST()
419 expected = APFloat(APFloat::IEEEquad, in TEST()
421 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
427 test = APFloat(APFloat::IEEEquad, in TEST()
429 expected = APFloat(APFloat::IEEEquad, in TEST()
431 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
437 test = APFloat(APFloat::IEEEquad, in TEST()
439 expected = APFloat(APFloat::IEEEquad, in TEST()
441 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
447 test = APFloat(APFloat::IEEEquad, in TEST()
449 expected = APFloat(APFloat::IEEEquad, in TEST()
451 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
458 APFloat::roundingMode rdmd = APFloat::rmNearestTiesToEven; in TEST()
461 APFloat f1(14.5f); in TEST()
462 APFloat f2(-14.5f); in TEST()
463 APFloat f3(225.0f); in TEST()
464 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
469 APFloat Val2(2.0f); in TEST()
470 APFloat f1((float)1.17549435e-38F); in TEST()
471 APFloat f2((float)1.17549435e-38F); in TEST()
474 APFloat f3(12.0f); in TEST()
475 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
482 APFloat f1(1.0); in TEST()
483 APFloat f2(-1.0); in TEST()
484 APFloat f3(1.0); in TEST()
485 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
493 APFloat f1(1.0); in TEST()
494 APFloat f2(-1.0); in TEST()
495 APFloat f3(1.0); in TEST()
496 f1.fusedMultiplyAdd(f2, f3, APFloat::rmTowardNegative); in TEST()
503 APFloat f1(0.0); in TEST()
504 APFloat f2(-0.0); in TEST()
505 APFloat f3(-0.0); in TEST()
506 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
512 APFloat f1(APFloat::IEEEdouble, "-0x1p-1074"); in TEST()
513 APFloat f2(APFloat::IEEEdouble, "+0x1p-1074"); in TEST()
514 APFloat f3(0.0); in TEST()
515 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
521 APFloat M1(APFloat::x87DoubleExtended, 1.0); in TEST()
522 APFloat M2(APFloat::x87DoubleExtended, 1.0); in TEST()
523 APFloat A(APFloat::x87DoubleExtended, 3.0); in TEST()
526 M1.fusedMultiplyAdd(M1, A, APFloat::rmNearestTiesToEven); in TEST()
527 M1.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
534 APFloat f1(1.0); in TEST()
535 APFloat f2(2.0); in TEST()
536 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble); in TEST()
545 APFloat f1(1.0); in TEST()
546 APFloat f2(2.0); in TEST()
547 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble); in TEST()
556 APFloat::roundingMode rdmd = APFloat::rmNearestTiesToEven; in TEST()
561 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, MinNormalStr).isDenormal()); in TEST()
562 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, 0.0).isDenormal()); in TEST()
564 APFloat Val2(APFloat::IEEEsingle, 2.0e0); in TEST()
565 APFloat T(APFloat::IEEEsingle, MinNormalStr); in TEST()
573 EXPECT_FALSE(APFloat(APFloat::IEEEdouble, MinNormalStr).isDenormal()); in TEST()
574 EXPECT_FALSE(APFloat(APFloat::IEEEdouble, 0.0).isDenormal()); in TEST()
576 APFloat Val2(APFloat::IEEEdouble, 2.0e0); in TEST()
577 APFloat T(APFloat::IEEEdouble, MinNormalStr); in TEST()
585 EXPECT_FALSE(APFloat(APFloat::x87DoubleExtended, MinNormalStr).isDenormal()); in TEST()
586 EXPECT_FALSE(APFloat(APFloat::x87DoubleExtended, 0.0).isDenormal()); in TEST()
588 APFloat Val2(APFloat::x87DoubleExtended, 2.0e0); in TEST()
589 APFloat T(APFloat::x87DoubleExtended, MinNormalStr); in TEST()
597 EXPECT_FALSE(APFloat(APFloat::IEEEquad, MinNormalStr).isDenormal()); in TEST()
598 EXPECT_FALSE(APFloat(APFloat::IEEEquad, 0.0).isDenormal()); in TEST()
600 APFloat Val2(APFloat::IEEEquad, 2.0e0); in TEST()
601 APFloat T(APFloat::IEEEquad, MinNormalStr); in TEST()
608 EXPECT_EQ(0.0f, APFloat(0.0f).convertToFloat()); in TEST()
609 EXPECT_EQ(-0.0f, APFloat(-0.0f).convertToFloat()); in TEST()
610 EXPECT_TRUE(APFloat(-0.0f).isNegative()); in TEST()
612 EXPECT_EQ(0.0, APFloat(0.0).convertToDouble()); in TEST()
613 EXPECT_EQ(-0.0, APFloat(-0.0).convertToDouble()); in TEST()
614 EXPECT_TRUE(APFloat(-0.0).isNegative()); in TEST()
620 APFloat Val(APFloat::IEEEdouble); in TEST()
622 llvm::APFloat::rmNearestTiesToEven); in TEST()
625 llvm::APFloat::rmNearestTiesToEven); in TEST()
628 llvm::APFloat::rmNearestTiesToEven); in TEST()
631 llvm::APFloat::rmNearestTiesToEven); in TEST()
634 llvm::APFloat::rmNearestTiesToEven); in TEST()
637 llvm::APFloat::rmNearestTiesToEven); in TEST()
643 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0").convertToDouble()); in TEST()
644 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0").convertToDouble()); in TEST()
645 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0").convertToDouble()); in TEST()
647 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.").convertToDouble()); in TEST()
648 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.").convertToDouble()); in TEST()
649 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.").convertToDouble()); in TEST()
651 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, ".0").convertToDouble()); in TEST()
652 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+.0").convertToDouble()); in TEST()
653 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-.0").convertToDouble()); in TEST()
655 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.0").convertToDouble()); in TEST()
656 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.0").convertToDouble()); in TEST()
657 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.0").convertToDouble()); in TEST()
659 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "00000.").convertToDouble()); in TEST()
660 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+00000.").convertToDouble()); in TEST()
661 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-00000.").convertToDouble()); in TEST()
663 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, ".00000").convertToDouble()); in TEST()
664 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+.00000").convertToDouble()); in TEST()
665 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-.00000").convertToDouble()); in TEST()
667 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0000.00000").convertToDouble()); in TEST()
668 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0000.00000").convertToDouble()); in TEST()
669 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0000.00000").convertToDouble()); in TEST()
673 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e1").convertToDouble()); in TEST()
674 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e1").convertToDouble()); in TEST()
675 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e1").convertToDouble()); in TEST()
677 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e+1").convertToDouble()); in TEST()
678 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e+1").convertToDouble()); in TEST()
679 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e+1").convertToDouble()); in TEST()
681 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e-1").convertToDouble()); in TEST()
682 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e-1").convertToDouble()); in TEST()
683 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e-1").convertToDouble()); in TEST()
686 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.e1").convertToDouble()); in TEST()
687 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.e1").convertToDouble()); in TEST()
688 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.e1").convertToDouble()); in TEST()
690 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.e+1").convertToDouble()); in TEST()
691 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.e+1").convertToDouble()); in TEST()
692 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.e+1").convertToDouble()); in TEST()
694 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.e-1").convertToDouble()); in TEST()
695 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.e-1").convertToDouble()); in TEST()
696 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.e-1").convertToDouble()); in TEST()
698 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, ".0e1").convertToDouble()); in TEST()
699 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+.0e1").convertToDouble()); in TEST()
700 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-.0e1").convertToDouble()); in TEST()
702 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, ".0e+1").convertToDouble()); in TEST()
703 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+.0e+1").convertToDouble()); in TEST()
704 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-.0e+1").convertToDouble()); in TEST()
706 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, ".0e-1").convertToDouble()); in TEST()
707 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+.0e-1").convertToDouble()); in TEST()
708 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-.0e-1").convertToDouble()); in TEST()
711 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.0e1").convertToDouble()); in TEST()
712 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.0e1").convertToDouble()); in TEST()
713 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.0e1").convertToDouble()); in TEST()
715 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.0e+1").convertToDouble()); in TEST()
716 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.0e+1").convertToDouble()); in TEST()
717 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.0e+1").convertToDouble()); in TEST()
719 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0.0e-1").convertToDouble()); in TEST()
720 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0.0e-1").convertToDouble()); in TEST()
721 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0.0e-1").convertToDouble()); in TEST()
724 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "000.0000e1").convertToDouble()); in TEST()
725 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+000.0000e+1").convertToDouble()); in TEST()
726 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-000.0000e+1").convertToDouble()); in TEST()
730 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e1234").convertToDouble()); in TEST()
731 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e1234").convertToDouble()); in TEST()
732 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e1234").convertToDouble()); in TEST()
734 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e+1234").convertToDouble()); in TEST()
735 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e+1234").convertToDouble()); in TEST()
736 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e+1234").convertToDouble()); in TEST()
738 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0e-1234").convertToDouble()); in TEST()
739 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0e-1234").convertToDouble()); in TEST()
740 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0e-1234").convertToDouble()); in TEST()
742 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, "000.0000e1234").convertToDouble()); in TEST()
743 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, "000.0000e-1234").convertToDouble()); in TEST()
745 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble, StringRef("0e1234\02", 6)).convertToDouble()); in TEST()
749 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0p1").convertToDouble()); in TEST()
750 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0p1").convertToDouble()); in TEST()
751 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0p1").convertToDouble()); in TEST()
753 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0p+1").convertToDouble()); in TEST()
754 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0p+1").convertToDouble()); in TEST()
755 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0p+1").convertToDouble()); in TEST()
757 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0p-1").convertToDouble()); in TEST()
758 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0p-1").convertToDouble()); in TEST()
759 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0p-1").convertToDouble()); in TEST()
762 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.p1").convertToDouble()); in TEST()
763 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.p1").convertToDouble()); in TEST()
764 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.p1").convertToDouble()); in TEST()
766 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.p+1").convertToDouble()); in TEST()
767 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.p+1").convertToDouble()); in TEST()
768 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.p+1").convertToDouble()); in TEST()
770 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.p-1").convertToDouble()); in TEST()
771 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.p-1").convertToDouble()); in TEST()
772 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.p-1").convertToDouble()); in TEST()
775 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x.0p1").convertToDouble()); in TEST()
776 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x.0p1").convertToDouble()); in TEST()
777 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x.0p1").convertToDouble()); in TEST()
779 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x.0p+1").convertToDouble()); in TEST()
780 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x.0p+1").convertToDouble()); in TEST()
781 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x.0p+1").convertToDouble()); in TEST()
783 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x.0p-1").convertToDouble()); in TEST()
784 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x.0p-1").convertToDouble()); in TEST()
785 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x.0p-1").convertToDouble()); in TEST()
788 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.0p1").convertToDouble()); in TEST()
789 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.0p1").convertToDouble()); in TEST()
790 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.0p1").convertToDouble()); in TEST()
792 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.0p+1").convertToDouble()); in TEST()
793 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.0p+1").convertToDouble()); in TEST()
794 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.0p+1").convertToDouble()); in TEST()
796 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.0p-1").convertToDouble()); in TEST()
797 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble, "+0x0.0p-1").convertToDouble()); in TEST()
798 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0.0p-1").convertToDouble()); in TEST()
801 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x00000.p1").convertToDouble()); in TEST()
802 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0000.00000p1").convertToDouble()); in TEST()
803 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x.00000p1").convertToDouble()); in TEST()
804 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.p1").convertToDouble()); in TEST()
805 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0p1234").convertToDouble()); in TEST()
806 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble, "-0x0p1234").convertToDouble()); in TEST()
807 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x00000.p1234").convertToDouble()); in TEST()
808 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0000.00000p1234").convertToDouble()); in TEST()
809 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x.00000p1234").convertToDouble()); in TEST()
810 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble, "0x0.p1234").convertToDouble()); in TEST()
814 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble, "1").convertToDouble()); in TEST()
815 EXPECT_EQ(2.0, APFloat(APFloat::IEEEdouble, "2.").convertToDouble()); in TEST()
816 EXPECT_EQ(0.5, APFloat(APFloat::IEEEdouble, ".5").convertToDouble()); in TEST()
817 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble, "1.0").convertToDouble()); in TEST()
818 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble, "-2").convertToDouble()); in TEST()
819 EXPECT_EQ(-4.0, APFloat(APFloat::IEEEdouble, "-4.").convertToDouble()); in TEST()
820 EXPECT_EQ(-0.5, APFloat(APFloat::IEEEdouble, "-.5").convertToDouble()); in TEST()
821 EXPECT_EQ(-1.5, APFloat(APFloat::IEEEdouble, "-1.5").convertToDouble()); in TEST()
822 EXPECT_EQ(1.25e12, APFloat(APFloat::IEEEdouble, "1.25e12").convertToDouble()); in TEST()
823 EXPECT_EQ(1.25e+12, APFloat(APFloat::IEEEdouble, "1.25e+12").convertToDouble()); in TEST()
824 EXPECT_EQ(1.25e-12, APFloat(APFloat::IEEEdouble, "1.25e-12").convertToDouble()); in TEST()
825 EXPECT_EQ(1024.0, APFloat(APFloat::IEEEdouble, "1024.").convertToDouble()); in TEST()
826 EXPECT_EQ(1024.05, APFloat(APFloat::IEEEdouble, "1024.05000").convertToDouble()); in TEST()
827 EXPECT_EQ(0.05, APFloat(APFloat::IEEEdouble, ".05000").convertToDouble()); in TEST()
828 EXPECT_EQ(2.0, APFloat(APFloat::IEEEdouble, "2.").convertToDouble()); in TEST()
829 EXPECT_EQ(2.0e2, APFloat(APFloat::IEEEdouble, "2.e2").convertToDouble()); in TEST()
830 EXPECT_EQ(2.0e+2, APFloat(APFloat::IEEEdouble, "2.e+2").convertToDouble()); in TEST()
831 EXPECT_EQ(2.0e-2, APFloat(APFloat::IEEEdouble, "2.e-2").convertToDouble()); in TEST()
832 EXPECT_EQ(2.05e2, APFloat(APFloat::IEEEdouble, "002.05000e2").convertToDouble()); in TEST()
833 EXPECT_EQ(2.05e+2, APFloat(APFloat::IEEEdouble, "002.05000e+2").convertToDouble()); in TEST()
834 EXPECT_EQ(2.05e-2, APFloat(APFloat::IEEEdouble, "002.05000e-2").convertToDouble()); in TEST()
835 EXPECT_EQ(2.05e12, APFloat(APFloat::IEEEdouble, "002.05000e12").convertToDouble()); in TEST()
836 EXPECT_EQ(2.05e+12, APFloat(APFloat::IEEEdouble, "002.05000e+12").convertToDouble()); in TEST()
837 EXPECT_EQ(2.05e-12, APFloat(APFloat::IEEEdouble, "002.05000e-12").convertToDouble()); in TEST()
841 EXPECT_TRUE(APFloat(APFloat::IEEEdouble, "99e99999").isInfinity()); in TEST()
842 EXPECT_TRUE(APFloat(APFloat::IEEEdouble, "-99e99999").isInfinity()); in TEST()
843 EXPECT_TRUE(APFloat(APFloat::IEEEdouble, "1e-99999").isPosZero()); in TEST()
844 EXPECT_TRUE(APFloat(APFloat::IEEEdouble, "-1e-99999").isNegZero()); in TEST()
850 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble, "0x1p0").convertToDouble()); in TEST()
851 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble, "+0x1p0").convertToDouble()); in TEST()
852 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble, "-0x1p0").convertToDouble()); in TEST()
854 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble, "0x1p+0").convertToDouble()); in TEST()
855 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble, "+0x1p+0").convertToDouble()); in TEST()
856 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble, "-0x1p+0").convertToDouble()); in TEST()
858 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble, "0x1p-0").convertToDouble()); in TEST()
859 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble, "+0x1p-0").convertToDouble()); in TEST()
860 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble, "-0x1p-0").convertToDouble()); in TEST()
863 EXPECT_EQ( 2.0, APFloat(APFloat::IEEEdouble, "0x1p1").convertToDouble()); in TEST()
864 EXPECT_EQ(+2.0, APFloat(APFloat::IEEEdouble, "+0x1p1").convertToDouble()); in TEST()
865 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble, "-0x1p1").convertToDouble()); in TEST()
867 EXPECT_EQ( 2.0, APFloat(APFloat::IEEEdouble, "0x1p+1").convertToDouble()); in TEST()
868 EXPECT_EQ(+2.0, APFloat(APFloat::IEEEdouble, "+0x1p+1").convertToDouble()); in TEST()
869 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble, "-0x1p+1").convertToDouble()); in TEST()
871 EXPECT_EQ( 0.5, APFloat(APFloat::IEEEdouble, "0x1p-1").convertToDouble()); in TEST()
872 EXPECT_EQ(+0.5, APFloat(APFloat::IEEEdouble, "+0x1p-1").convertToDouble()); in TEST()
873 EXPECT_EQ(-0.5, APFloat(APFloat::IEEEdouble, "-0x1p-1").convertToDouble()); in TEST()
876 EXPECT_EQ( 3.0, APFloat(APFloat::IEEEdouble, "0x1.8p1").convertToDouble()); in TEST()
877 EXPECT_EQ(+3.0, APFloat(APFloat::IEEEdouble, "+0x1.8p1").convertToDouble()); in TEST()
878 EXPECT_EQ(-3.0, APFloat(APFloat::IEEEdouble, "-0x1.8p1").convertToDouble()); in TEST()
880 EXPECT_EQ( 3.0, APFloat(APFloat::IEEEdouble, "0x1.8p+1").convertToDouble()); in TEST()
881 EXPECT_EQ(+3.0, APFloat(APFloat::IEEEdouble, "+0x1.8p+1").convertToDouble()); in TEST()
882 EXPECT_EQ(-3.0, APFloat(APFloat::IEEEdouble, "-0x1.8p+1").convertToDouble()); in TEST()
884 EXPECT_EQ( 0.75, APFloat(APFloat::IEEEdouble, "0x1.8p-1").convertToDouble()); in TEST()
885 EXPECT_EQ(+0.75, APFloat(APFloat::IEEEdouble, "+0x1.8p-1").convertToDouble()); in TEST()
886 EXPECT_EQ(-0.75, APFloat(APFloat::IEEEdouble, "-0x1.8p-1").convertToDouble()); in TEST()
889 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble, "0x1000.000p1").convertToDouble()); in TEST()
890 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble, "+0x1000.000p1").convertToDouble()); in TEST()
891 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble, "-0x1000.000p1").convertToDouble()); in TEST()
893 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble, "0x1000.000p+1").convertToDouble()); in TEST()
894 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble, "+0x1000.000p+1").convertToDouble()); in TEST()
895 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble, "-0x1000.000p+1").convertToDouble()); in TEST()
897 EXPECT_EQ( 2048.0, APFloat(APFloat::IEEEdouble, "0x1000.000p-1").convertToDouble()); in TEST()
898 EXPECT_EQ(+2048.0, APFloat(APFloat::IEEEdouble, "+0x1000.000p-1").convertToDouble()); in TEST()
899 EXPECT_EQ(-2048.0, APFloat(APFloat::IEEEdouble, "-0x1000.000p-1").convertToDouble()); in TEST()
902 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble, "0x1000p1").convertToDouble()); in TEST()
903 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble, "+0x1000p1").convertToDouble()); in TEST()
904 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble, "-0x1000p1").convertToDouble()); in TEST()
906 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble, "0x1000p+1").convertToDouble()); in TEST()
907 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble, "+0x1000p+1").convertToDouble()); in TEST()
908 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble, "-0x1000p+1").convertToDouble()); in TEST()
910 EXPECT_EQ( 2048.0, APFloat(APFloat::IEEEdouble, "0x1000p-1").convertToDouble()); in TEST()
911 EXPECT_EQ(+2048.0, APFloat(APFloat::IEEEdouble, "+0x1000p-1").convertToDouble()); in TEST()
912 EXPECT_EQ(-2048.0, APFloat(APFloat::IEEEdouble, "-0x1000p-1").convertToDouble()); in TEST()
915 EXPECT_EQ( 16384.0, APFloat(APFloat::IEEEdouble, "0x10p10").convertToDouble()); in TEST()
916 EXPECT_EQ(+16384.0, APFloat(APFloat::IEEEdouble, "+0x10p10").convertToDouble()); in TEST()
917 EXPECT_EQ(-16384.0, APFloat(APFloat::IEEEdouble, "-0x10p10").convertToDouble()); in TEST()
919 EXPECT_EQ( 16384.0, APFloat(APFloat::IEEEdouble, "0x10p+10").convertToDouble()); in TEST()
920 EXPECT_EQ(+16384.0, APFloat(APFloat::IEEEdouble, "+0x10p+10").convertToDouble()); in TEST()
921 EXPECT_EQ(-16384.0, APFloat(APFloat::IEEEdouble, "-0x10p+10").convertToDouble()); in TEST()
923 EXPECT_EQ( 0.015625, APFloat(APFloat::IEEEdouble, "0x10p-10").convertToDouble()); in TEST()
924 EXPECT_EQ(+0.015625, APFloat(APFloat::IEEEdouble, "+0x10p-10").convertToDouble()); in TEST()
925 EXPECT_EQ(-0.015625, APFloat(APFloat::IEEEdouble, "-0x10p-10").convertToDouble()); in TEST()
927 EXPECT_EQ(1.0625, APFloat(APFloat::IEEEdouble, "0x1.1p0").convertToDouble()); in TEST()
928 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble, "0x1p0").convertToDouble()); in TEST()
956 EXPECT_EQ(APFloat::opOK, in TEST()
957 APFloat(APFloat::IEEEdouble, "10") in TEST()
958 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
962 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
963 APFloat(APFloat::IEEEdouble, "-10") in TEST()
964 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
968 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
969 APFloat(APFloat::IEEEdouble, "32") in TEST()
970 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
974 EXPECT_EQ(APFloat::opInexact, in TEST()
975 APFloat(APFloat::IEEEdouble, "7.9") in TEST()
976 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
981 EXPECT_EQ(APFloat::opOK, in TEST()
982 APFloat(APFloat::IEEEdouble, "-10") in TEST()
983 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
987 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
988 APFloat(APFloat::IEEEdouble, "-17") in TEST()
989 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
993 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
994 APFloat(APFloat::IEEEdouble, "16") in TEST()
995 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1004 return APFloat::getSNaN(Sem, Negative, &apfill).bitcastToAPInt(); in nanbits()
1006 return APFloat::getQNaN(Sem, Negative, &apfill).bitcastToAPInt(); in nanbits()
1010 ASSERT_EQ(0x7fc00000, nanbits(APFloat::IEEEsingle, false, false, 0)); in TEST()
1011 ASSERT_EQ(0xffc00000, nanbits(APFloat::IEEEsingle, false, true, 0)); in TEST()
1012 ASSERT_EQ(0x7fc0ae72, nanbits(APFloat::IEEEsingle, false, false, 0xae72)); in TEST()
1013 ASSERT_EQ(0x7fffae72, nanbits(APFloat::IEEEsingle, false, false, 0xffffae72)); in TEST()
1014 ASSERT_EQ(0x7fa00000, nanbits(APFloat::IEEEsingle, true, false, 0)); in TEST()
1015 ASSERT_EQ(0xffa00000, nanbits(APFloat::IEEEsingle, true, true, 0)); in TEST()
1016 ASSERT_EQ(0x7f80ae72, nanbits(APFloat::IEEEsingle, true, false, 0xae72)); in TEST()
1017 ASSERT_EQ(0x7fbfae72, nanbits(APFloat::IEEEsingle, true, false, 0xffffae72)); in TEST()
1019 ASSERT_EQ(0x7ff8000000000000ULL, nanbits(APFloat::IEEEdouble, false, false, 0)); in TEST()
1020 ASSERT_EQ(0xfff8000000000000ULL, nanbits(APFloat::IEEEdouble, false, true, 0)); in TEST()
1021 ASSERT_EQ(0x7ff800000000ae72ULL, nanbits(APFloat::IEEEdouble, false, false, 0xae72)); in TEST()
1022 …ASSERT_EQ(0x7fffffffffffae72ULL, nanbits(APFloat::IEEEdouble, false, false, 0xffffffffffffae72ULL)… in TEST()
1023 ASSERT_EQ(0x7ff4000000000000ULL, nanbits(APFloat::IEEEdouble, true, false, 0)); in TEST()
1024 ASSERT_EQ(0xfff4000000000000ULL, nanbits(APFloat::IEEEdouble, true, true, 0)); in TEST()
1025 ASSERT_EQ(0x7ff000000000ae72ULL, nanbits(APFloat::IEEEdouble, true, false, 0xae72)); in TEST()
1026 …ASSERT_EQ(0x7ff7ffffffffae72ULL, nanbits(APFloat::IEEEdouble, true, false, 0xffffffffffffae72ULL)); in TEST()
1032 …EXPECT_DEATH(APFloat(APFloat::IEEEsingle, 0.0f).convertToDouble(), "Float semantics are not IEEEdo… in TEST()
1033 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, 0.0 ).convertToFloat(), "Float semantics are not IEEEsi… in TEST()
1037 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ""), "Invalid string length"); in TEST()
1038 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+"), "String has no digits"); in TEST()
1039 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-"), "String has no digits"); in TEST()
1041 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("\0", 1)), "Invalid character in significand"); in TEST()
1042 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1\0", 2)), "Invalid character in significand"… in TEST()
1043 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1\02", 3)), "Invalid character in significand… in TEST()
1044 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1\02e1", 5)), "Invalid character in significa… in TEST()
1045 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1e\0", 3)), "Invalid character in exponent"); in TEST()
1046 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1e1\0", 4)), "Invalid character in exponent"); in TEST()
1047 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("1e1\02", 5)), "Invalid character in exponent"… in TEST()
1049 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.0f"), "Invalid character in significand"); in TEST()
1051 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".."), "String contains multiple dots"); in TEST()
1052 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "..0"), "String contains multiple dots"); in TEST()
1053 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.0.0"), "String contains multiple dots"); in TEST()
1057 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "."), "Significand has no digits"); in TEST()
1058 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+."), "Significand has no digits"); in TEST()
1059 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-."), "Significand has no digits"); in TEST()
1062 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "e"), "Significand has no digits"); in TEST()
1063 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+e"), "Significand has no digits"); in TEST()
1064 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-e"), "Significand has no digits"); in TEST()
1066 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "e1"), "Significand has no digits"); in TEST()
1067 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+e1"), "Significand has no digits"); in TEST()
1068 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-e1"), "Significand has no digits"); in TEST()
1070 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".e1"), "Significand has no digits"); in TEST()
1071 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+.e1"), "Significand has no digits"); in TEST()
1072 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-.e1"), "Significand has no digits"); in TEST()
1075 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".e"), "Significand has no digits"); in TEST()
1076 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+.e"), "Significand has no digits"); in TEST()
1077 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-.e"), "Significand has no digits"); in TEST()
1081 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1e"), "Exponent has no digits"); in TEST()
1082 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+1e"), "Exponent has no digits"); in TEST()
1083 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-1e"), "Exponent has no digits"); in TEST()
1085 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.e"), "Exponent has no digits"); in TEST()
1086 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+1.e"), "Exponent has no digits"); in TEST()
1087 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-1.e"), "Exponent has no digits"); in TEST()
1089 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".1e"), "Exponent has no digits"); in TEST()
1090 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+.1e"), "Exponent has no digits"); in TEST()
1091 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-.1e"), "Exponent has no digits"); in TEST()
1093 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.1e"), "Exponent has no digits"); in TEST()
1094 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+1.1e"), "Exponent has no digits"); in TEST()
1095 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-1.1e"), "Exponent has no digits"); in TEST()
1098 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1e+"), "Exponent has no digits"); in TEST()
1099 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1e-"), "Exponent has no digits"); in TEST()
1101 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".1e"), "Exponent has no digits"); in TEST()
1102 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".1e+"), "Exponent has no digits"); in TEST()
1103 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, ".1e-"), "Exponent has no digits"); in TEST()
1105 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.0e"), "Exponent has no digits"); in TEST()
1106 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.0e+"), "Exponent has no digits"); in TEST()
1107 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "1.0e-"), "Exponent has no digits"); in TEST()
1111 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x"), "Invalid string"); in TEST()
1112 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x"), "Invalid string"); in TEST()
1113 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x"), "Invalid string"); in TEST()
1115 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x0"), "Hex strings require an exponent"); in TEST()
1116 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x0"), "Hex strings require an exponent"); in TEST()
1117 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x0"), "Hex strings require an exponent"); in TEST()
1119 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x0."), "Hex strings require an exponent"); in TEST()
1120 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x0."), "Hex strings require an exponent"); in TEST()
1121 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x0."), "Hex strings require an exponent"); in TEST()
1123 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.0"), "Hex strings require an exponent"); in TEST()
1124 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.0"), "Hex strings require an exponent"); in TEST()
1125 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.0"), "Hex strings require an exponent"); in TEST()
1127 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x0.0"), "Hex strings require an exponent"); in TEST()
1128 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x0.0"), "Hex strings require an exponent"); in TEST()
1129 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x0.0"), "Hex strings require an exponent"); in TEST()
1131 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x\0", 3)), "Invalid character in significand… in TEST()
1132 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1\0", 4)), "Invalid character in significan… in TEST()
1133 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1\02", 5)), "Invalid character in significa… in TEST()
1134 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1\02p1", 7)), "Invalid character in signifi… in TEST()
1135 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1p\0", 5)), "Invalid character in exponent"… in TEST()
1136 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1p1\0", 6)), "Invalid character in exponent… in TEST()
1137 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble, StringRef("0x1p1\02", 7)), "Invalid character in exponen… in TEST()
1139 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1p0f"), "Invalid character in exponent"); in TEST()
1141 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x..p1"), "String contains multiple dots"); in TEST()
1142 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x..0p1"), "String contains multiple dots"); in TEST()
1143 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.0.0p1"), "String contains multiple dots"); in TEST()
1147 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x."), "Significand has no digits"); in TEST()
1148 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x."), "Significand has no digits"); in TEST()
1149 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x."), "Significand has no digits"); in TEST()
1151 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0xp"), "Significand has no digits"); in TEST()
1152 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0xp"), "Significand has no digits"); in TEST()
1153 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0xp"), "Significand has no digits"); in TEST()
1155 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0xp+"), "Significand has no digits"); in TEST()
1156 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0xp+"), "Significand has no digits"); in TEST()
1157 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0xp+"), "Significand has no digits"); in TEST()
1159 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0xp-"), "Significand has no digits"); in TEST()
1160 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0xp-"), "Significand has no digits"); in TEST()
1161 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0xp-"), "Significand has no digits"); in TEST()
1164 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.p"), "Significand has no digits"); in TEST()
1165 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.p"), "Significand has no digits"); in TEST()
1166 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.p"), "Significand has no digits"); in TEST()
1168 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.p+"), "Significand has no digits"); in TEST()
1169 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.p+"), "Significand has no digits"); in TEST()
1170 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.p+"), "Significand has no digits"); in TEST()
1172 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.p-"), "Significand has no digits"); in TEST()
1173 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.p-"), "Significand has no digits"); in TEST()
1174 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.p-"), "Significand has no digits"); in TEST()
1178 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1p"), "Exponent has no digits"); in TEST()
1179 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1p"), "Exponent has no digits"); in TEST()
1180 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1p"), "Exponent has no digits"); in TEST()
1182 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1p+"), "Exponent has no digits"); in TEST()
1183 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1p+"), "Exponent has no digits"); in TEST()
1184 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1p+"), "Exponent has no digits"); in TEST()
1186 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1p-"), "Exponent has no digits"); in TEST()
1187 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1p-"), "Exponent has no digits"); in TEST()
1188 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1p-"), "Exponent has no digits"); in TEST()
1191 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.p"), "Exponent has no digits"); in TEST()
1192 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.p"), "Exponent has no digits"); in TEST()
1193 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.p"), "Exponent has no digits"); in TEST()
1195 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.p+"), "Exponent has no digits"); in TEST()
1196 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.p+"), "Exponent has no digits"); in TEST()
1197 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.p+"), "Exponent has no digits"); in TEST()
1199 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.p-"), "Exponent has no digits"); in TEST()
1200 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.p-"), "Exponent has no digits"); in TEST()
1201 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.p-"), "Exponent has no digits"); in TEST()
1204 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.1p"), "Exponent has no digits"); in TEST()
1205 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.1p"), "Exponent has no digits"); in TEST()
1206 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.1p"), "Exponent has no digits"); in TEST()
1208 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.1p+"), "Exponent has no digits"); in TEST()
1209 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.1p+"), "Exponent has no digits"); in TEST()
1210 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.1p+"), "Exponent has no digits"); in TEST()
1212 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x.1p-"), "Exponent has no digits"); in TEST()
1213 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x.1p-"), "Exponent has no digits"); in TEST()
1214 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x.1p-"), "Exponent has no digits"); in TEST()
1217 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.1p"), "Exponent has no digits"); in TEST()
1218 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.1p"), "Exponent has no digits"); in TEST()
1219 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.1p"), "Exponent has no digits"); in TEST()
1221 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.1p+"), "Exponent has no digits"); in TEST()
1222 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.1p+"), "Exponent has no digits"); in TEST()
1223 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.1p+"), "Exponent has no digits"); in TEST()
1225 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "0x1.1p-"), "Exponent has no digits"); in TEST()
1226 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "+0x1.1p-"), "Exponent has no digits"); in TEST()
1227 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.1p-"), "Exponent has no digits"); in TEST()
1233 APFloat inv(0.0f); in TEST()
1236 EXPECT_TRUE(APFloat(2.0).getExactInverse(&inv)); in TEST()
1237 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(0.5))); in TEST()
1238 EXPECT_TRUE(APFloat(2.0f).getExactInverse(&inv)); in TEST()
1239 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(0.5f))); in TEST()
1240 EXPECT_TRUE(APFloat(APFloat::IEEEquad, "2.0").getExactInverse(&inv)); in TEST()
1241 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::IEEEquad, "0.5"))); in TEST()
1242 EXPECT_TRUE(APFloat(APFloat::PPCDoubleDouble, "2.0").getExactInverse(&inv)); in TEST()
1243 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::PPCDoubleDouble, "0.5"))); in TEST()
1244 EXPECT_TRUE(APFloat(APFloat::x87DoubleExtended, "2.0").getExactInverse(&inv)); in TEST()
1245 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::x87DoubleExtended, "0.5"))); in TEST()
1248 EXPECT_TRUE(APFloat(1.17549435e-38f).getExactInverse(&inv)); in TEST()
1249 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(8.5070592e+37f))); in TEST()
1252 EXPECT_FALSE(APFloat(1.7014118e38f).getExactInverse(nullptr)); in TEST()
1254 EXPECT_FALSE(APFloat(0.0).getExactInverse(nullptr)); in TEST()
1256 EXPECT_FALSE(APFloat(1.40129846e-45f).getExactInverse(nullptr)); in TEST()
1260 APFloat T(-0.5), S(3.14), R(APFloat::getLargest(APFloat::IEEEdouble)), P(0.0); in TEST()
1263 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1266 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1269 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1272 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1276 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1279 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1282 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1285 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1289 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1292 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1295 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1298 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1301 P = APFloat::getZero(APFloat::IEEEdouble); in TEST()
1302 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1304 P = APFloat::getZero(APFloat::IEEEdouble, true); in TEST()
1305 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1307 P = APFloat::getNaN(APFloat::IEEEdouble); in TEST()
1308 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1310 P = APFloat::getInf(APFloat::IEEEdouble); in TEST()
1311 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1313 P = APFloat::getInf(APFloat::IEEEdouble, true); in TEST()
1314 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1319 APFloat T(-0.0); in TEST()
1321 T = APFloat(3.14159); in TEST()
1323 T = APFloat::getNaN(APFloat::IEEEdouble); in TEST()
1325 T = APFloat::getInf(APFloat::IEEEdouble); in TEST()
1327 T = APFloat::getInf(APFloat::IEEEdouble, true); in TEST()
1329 T = APFloat::getLargest(APFloat::IEEEdouble); in TEST()
1334 EXPECT_EQ(3.402823466e+38f, APFloat::getLargest(APFloat::IEEEsingle).convertToFloat()); in TEST()
1335 EXPECT_EQ(1.7976931348623158e+308, APFloat::getLargest(APFloat::IEEEdouble).convertToDouble()); in TEST()
1339 APFloat test = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
1340 APFloat expected = APFloat(APFloat::IEEEsingle, "0x0.000002p-126"); in TEST()
1346 test = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
1347 expected = APFloat(APFloat::IEEEsingle, "-0x0.000002p-126"); in TEST()
1353 test = APFloat::getSmallest(APFloat::IEEEquad, false); in TEST()
1354 expected = APFloat(APFloat::IEEEquad, "0x0.0000000000000000000000000001p-16382"); in TEST()
1360 test = APFloat::getSmallest(APFloat::IEEEquad, true); in TEST()
1361 expected = APFloat(APFloat::IEEEquad, "-0x0.0000000000000000000000000001p-16382"); in TEST()
1369 APFloat test = APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
1370 APFloat expected = APFloat(APFloat::IEEEsingle, "0x1p-126"); in TEST()
1376 test = APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
1377 expected = APFloat(APFloat::IEEEsingle, "-0x1p-126"); in TEST()
1383 test = APFloat::getSmallestNormalized(APFloat::IEEEquad, false); in TEST()
1384 expected = APFloat(APFloat::IEEEquad, "0x1p-16382"); in TEST()
1390 test = APFloat::getSmallestNormalized(APFloat::IEEEquad, true); in TEST()
1391 expected = APFloat(APFloat::IEEEquad, "-0x1p-16382"); in TEST()
1405 { &APFloat::IEEEhalf, false, {0, 0}, 1}, in TEST()
1406 { &APFloat::IEEEhalf, true, {0x8000ULL, 0}, 1}, in TEST()
1407 { &APFloat::IEEEsingle, false, {0, 0}, 1}, in TEST()
1408 { &APFloat::IEEEsingle, true, {0x80000000ULL, 0}, 1}, in TEST()
1409 { &APFloat::IEEEdouble, false, {0, 0}, 1}, in TEST()
1410 { &APFloat::IEEEdouble, true, {0x8000000000000000ULL, 0}, 1}, in TEST()
1411 { &APFloat::IEEEquad, false, {0, 0}, 2}, in TEST()
1412 { &APFloat::IEEEquad, true, {0, 0x8000000000000000ULL}, 2}, in TEST()
1413 { &APFloat::PPCDoubleDouble, false, {0, 0}, 2}, in TEST()
1414 { &APFloat::PPCDoubleDouble, true, {0x8000000000000000ULL, 0}, 2}, in TEST()
1415 { &APFloat::x87DoubleExtended, false, {0, 0}, 2}, in TEST()
1416 { &APFloat::x87DoubleExtended, true, {0, 0x8000ULL}, 2}, in TEST()
1420 APFloat test = APFloat::getZero(*GetZeroTest[i].semantics, in TEST()
1423 APFloat expected = APFloat(*GetZeroTest[i].semantics, in TEST()
1436 EXPECT_TRUE(APFloat(-42.0).bitwiseIsEqual( in TEST()
1437 APFloat::copySign(APFloat(42.0), APFloat(-1.0)))); in TEST()
1438 EXPECT_TRUE(APFloat(42.0).bitwiseIsEqual( in TEST()
1439 APFloat::copySign(APFloat(-42.0), APFloat(1.0)))); in TEST()
1440 EXPECT_TRUE(APFloat(-42.0).bitwiseIsEqual( in TEST()
1441 APFloat::copySign(APFloat(-42.0), APFloat(-1.0)))); in TEST()
1442 EXPECT_TRUE(APFloat(42.0).bitwiseIsEqual( in TEST()
1443 APFloat::copySign(APFloat(42.0), APFloat(1.0)))); in TEST()
1448 APFloat test(APFloat::IEEEdouble, "1.0"); in TEST()
1449 test.convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1453 test = APFloat(APFloat::x87DoubleExtended, "0x1p-53"); in TEST()
1454 test.add(APFloat(APFloat::x87DoubleExtended, "1.0"), APFloat::rmNearestTiesToEven); in TEST()
1455 test.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1459 test = APFloat(APFloat::IEEEquad, "0x1p-53"); in TEST()
1460 test.add(APFloat(APFloat::IEEEquad, "1.0"), APFloat::rmNearestTiesToEven); in TEST()
1461 test.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1465 test = APFloat(APFloat::x87DoubleExtended, "0xf.fffffffp+28"); in TEST()
1466 test.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1470 test = APFloat::getSNaN(APFloat::IEEEsingle); in TEST()
1471 APFloat X87SNaN = APFloat::getSNaN(APFloat::x87DoubleExtended); in TEST()
1472 test.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven, in TEST()
1477 test = APFloat::getQNaN(APFloat::IEEEsingle); in TEST()
1478 APFloat X87QNaN = APFloat::getQNaN(APFloat::x87DoubleExtended); in TEST()
1479 test.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven, in TEST()
1484 test = APFloat::getSNaN(APFloat::x87DoubleExtended); in TEST()
1485 test.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven, in TEST()
1490 test = APFloat::getQNaN(APFloat::x87DoubleExtended); in TEST()
1491 test.convert(APFloat::x87DoubleExtended, APFloat::rmNearestTiesToEven, in TEST()
1498 APFloat test(APFloat::PPCDoubleDouble, "1.0"); in TEST()
1502 test.divide(APFloat(APFloat::PPCDoubleDouble, "3.0"), APFloat::rmNearestTiesToEven); in TEST()
1507 test = APFloat(APFloat::PPCDoubleDouble, "1.79769313486231580793728971405301e+308"); in TEST()
1512 test = APFloat(APFloat::PPCDoubleDouble, "2.00416836000897277799610805135016e-292"); in TEST()
1516 test = APFloat(APFloat::PPCDoubleDouble, "1.0"); in TEST()
1517 test.add(APFloat(APFloat::PPCDoubleDouble, "0x1p-105"), APFloat::rmNearestTiesToEven); in TEST()
1521 test = APFloat(APFloat::PPCDoubleDouble, "1.0"); in TEST()
1522 test.add(APFloat(APFloat::PPCDoubleDouble, "0x1p-106"), APFloat::rmNearestTiesToEven); in TEST()
1534 APFloat t(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1536 t = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
1539 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNegative()); in TEST()
1540 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle, true).isNegative()); in TEST()
1542 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNegative()); in TEST()
1543 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle, true).isNegative()); in TEST()
1545 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isNegative()); in TEST()
1546 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle, true).isNegative()); in TEST()
1548 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNegative()); in TEST()
1549 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, true).isNegative()); in TEST()
1553 APFloat t(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1556 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNormal()); in TEST()
1557 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNormal()); in TEST()
1558 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isNormal()); in TEST()
1559 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNormal()); in TEST()
1560 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isNormal()); in TEST()
1564 APFloat t(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1566 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isFinite()); in TEST()
1567 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle, false).isFinite()); in TEST()
1568 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isFinite()); in TEST()
1569 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isFinite()); in TEST()
1570 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p-149").isFinite()); in TEST()
1574 APFloat t(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1576 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle, false).isInfinity()); in TEST()
1577 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isInfinity()); in TEST()
1578 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isInfinity()); in TEST()
1579 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isInfinity()); in TEST()
1580 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isInfinity()); in TEST()
1584 APFloat t(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1586 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isNaN()); in TEST()
1587 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isNaN()); in TEST()
1588 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle, false).isNaN()); in TEST()
1589 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle, false).isNaN()); in TEST()
1590 EXPECT_FALSE(APFloat(APFloat::IEEEsingle, "0x1p-149").isNaN()); in TEST()
1595 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p+0").isFiniteNonZero()); in TEST()
1596 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "-0x1p+0").isFiniteNonZero()); in TEST()
1599 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "0x1p-149").isFiniteNonZero()); in TEST()
1600 EXPECT_TRUE(APFloat(APFloat::IEEEsingle, "-0x1p-149").isFiniteNonZero()); in TEST()
1603 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, false).isFiniteNonZero()); in TEST()
1604 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle, true).isFiniteNonZero()); in TEST()
1607 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, false).isFiniteNonZero()); in TEST()
1608 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle, true).isFiniteNonZero()); in TEST()
1612 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, false).isFiniteNonZero()); in TEST()
1613 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle, true).isFiniteNonZero()); in TEST()
1617 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, false).isFiniteNonZero()); in TEST()
1618 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle, true).isFiniteNonZero()); in TEST()
1629 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
1630 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
1631 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
1632 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
1633 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
1634 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
1635 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1636 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
1637 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false); in TEST()
1638 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true); in TEST()
1639 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
1640 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
1641 APFloat PSmallestNormalized = in TEST()
1642 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
1643 APFloat MSmallestNormalized = in TEST()
1644 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
1646 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
1650 APFloat x; in TEST()
1651 APFloat y; in TEST()
1656 { PInf, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1657 { PInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1658 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1659 { PInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1660 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1663 { PInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1665 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1666 { PInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1667 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1668 { PInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1669 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1670 { PInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1671 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1672 { PInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1673 { MInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1674 { MInf, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1675 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1676 { MInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1677 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1680 { MInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1682 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1683 { MInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1684 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1685 { MInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1686 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1687 { MInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1688 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1689 { MInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1690 { PZero, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1691 { PZero, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1692 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1693 { PZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1694 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1697 { PZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1699 { PZero, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1700 { PZero, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1701 { PZero, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1702 { PZero, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1703 { PZero, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1704 { PZero, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1705 { PZero, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1706 { PZero, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1707 { MZero, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1708 { MZero, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1709 { MZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1710 { MZero, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1711 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1714 { MZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1716 { MZero, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1717 { MZero, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1718 { MZero, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1719 { MZero, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1720 { MZero, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1721 { MZero, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1722 { MZero, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1723 { MZero, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1724 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1725 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1726 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1727 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1728 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1731 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1733 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1734 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1735 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1736 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1737 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1738 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1739 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1740 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1743 { SNaN, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1744 { SNaN, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1745 { SNaN, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1746 { SNaN, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1747 { SNaN, QNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1748 { SNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1749 { SNaN, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1750 { SNaN, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1751 { SNaN, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1752 { SNaN, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1753 { SNaN, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1754 { SNaN, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1755 { SNaN, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1756 { SNaN, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1758 { PNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1759 { PNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1760 { PNormalValue, PZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1761 { PNormalValue, MZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1762 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1765 { PNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1767 { PNormalValue, PNormalValue, "0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
1768 { PNormalValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1769 { PNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1770 { PNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1771 { PNormalValue, PSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1772 { PNormalValue, MSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1773 { PNormalValue, PSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1774 { PNormalValue, MSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1775 { MNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1776 { MNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1777 { MNormalValue, PZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1778 { MNormalValue, MZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1779 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1782 { MNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1784 { MNormalValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1785 { MNormalValue, MNormalValue, "-0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
1786 { MNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1787 { MNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1788 { MNormalValue, PSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1789 { MNormalValue, MSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1790 { MNormalValue, PSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1791 { MNormalValue, MSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1792 { PLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1793 { PLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1794 { PLargestValue, PZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1795 { PLargestValue, MZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1796 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1799 { PLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1801 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1802 { PLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1803 { PLargestValue, PLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
1804 { PLargestValue, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1805 { PLargestValue, PSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1806 { PLargestValue, MSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1807 … { PLargestValue, PSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1808 … { PLargestValue, MSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1809 { MLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1810 { MLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1811 { MLargestValue, PZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1812 { MLargestValue, MZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1813 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1816 { MLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1818 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1819 { MLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1820 { MLargestValue, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1821 { MLargestValue, MLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
1822 { MLargestValue, PSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1823 { MLargestValue, MSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1824 … { MLargestValue, PSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1825 … { MLargestValue, MSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1826 { PSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1827 { PSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1828 { PSmallestValue, PZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1829 { PSmallestValue, MZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1830 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1833 { PSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1835 { PSmallestValue, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1836 { PSmallestValue, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1837 { PSmallestValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1838 { PSmallestValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1839 { PSmallestValue, PSmallestValue, "0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
1840 { PSmallestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1841 { PSmallestValue, PSmallestNormalized, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1842 { PSmallestValue, MSmallestNormalized, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1843 { MSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1844 { MSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1845 { MSmallestValue, PZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1846 { MSmallestValue, MZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1847 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1850 { MSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1852 { MSmallestValue, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1853 { MSmallestValue, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1854 { MSmallestValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1855 { MSmallestValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1856 { MSmallestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1857 { MSmallestValue, MSmallestValue, "-0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
1858 { MSmallestValue, PSmallestNormalized, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1859 { MSmallestValue, MSmallestNormalized, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1860 { PSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1861 { PSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1862 { PSmallestNormalized, PZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1863 { PSmallestNormalized, MZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1864 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1867 { PSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1869 { PSmallestNormalized, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1870 { PSmallestNormalized, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1871 … { PSmallestNormalized, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1872 … { PSmallestNormalized, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1873 { PSmallestNormalized, PSmallestValue, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1874 { PSmallestNormalized, MSmallestValue, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1875 { PSmallestNormalized, PSmallestNormalized, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
1876 { PSmallestNormalized, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1877 { MSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1878 { MSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1879 { MSmallestNormalized, PZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1880 { MSmallestNormalized, MZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1881 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1884 { MSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1886 { MSmallestNormalized, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1887 { MSmallestNormalized, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1888 … { MSmallestNormalized, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1889 … { MSmallestNormalized, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
1890 { MSmallestNormalized, PSmallestValue, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1891 { MSmallestNormalized, MSmallestValue, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1892 { MSmallestNormalized, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1893 { MSmallestNormalized, MSmallestNormalized, "-0x1p-125", APFloat::opOK, APFloat::fcNormal } in TEST()
1897 APFloat x(SpecialCaseTests[i].x); in TEST()
1898 APFloat y(SpecialCaseTests[i].y); in TEST()
1899 APFloat::opStatus status = x.add(y, APFloat::rmNearestTiesToEven); in TEST()
1901 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result); in TEST()
1917 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
1918 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
1919 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
1920 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
1921 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
1922 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
1923 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
1924 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
1925 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false); in TEST()
1926 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true); in TEST()
1927 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
1928 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
1929 APFloat PSmallestNormalized = in TEST()
1930 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
1931 APFloat MSmallestNormalized = in TEST()
1932 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
1934 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
1938 APFloat x; in TEST()
1939 APFloat y; in TEST()
1944 { PInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1945 { PInf, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1946 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1947 { PInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1948 { PInf, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1951 { PInf, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1953 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1954 { PInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1955 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1956 { PInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1957 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1958 { PInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1959 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1960 { PInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1961 { MInf, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1962 { MInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1963 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1964 { MInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1965 { MInf, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1968 { MInf, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1970 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1971 { MInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1972 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1973 { MInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1974 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1975 { MInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1976 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1977 { MInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1978 { PZero, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1979 { PZero, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1980 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1981 { PZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1982 { PZero, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
1985 { PZero, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
1987 { PZero, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1988 { PZero, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
1989 { PZero, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1990 { PZero, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
1991 { PZero, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1992 { PZero, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
1993 { PZero, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1994 { PZero, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
1995 { MZero, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1996 { MZero, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
1997 { MZero, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1998 { MZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
1999 { MZero, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2002 { MZero, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2004 { MZero, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2005 { MZero, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2006 { MZero, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2007 { MZero, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2008 { MZero, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2009 { MZero, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2010 { MZero, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2011 { MZero, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2012 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2013 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2014 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2015 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2016 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2019 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2021 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2022 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2023 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2024 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2025 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2026 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2027 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2028 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2031 { SNaN, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2032 { SNaN, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2033 { SNaN, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2034 { SNaN, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2035 { SNaN, QNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2036 { SNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2037 { SNaN, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2038 { SNaN, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2039 { SNaN, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2040 { SNaN, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2041 { SNaN, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2042 { SNaN, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2043 { SNaN, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2044 { SNaN, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2046 { PNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2047 { PNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2048 { PNormalValue, PZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2049 { PNormalValue, MZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2050 { PNormalValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2053 { PNormalValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2055 { PNormalValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2056 { PNormalValue, MNormalValue, "0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2057 { PNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2058 { PNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2059 { PNormalValue, PSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2060 { PNormalValue, MSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2061 { PNormalValue, PSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2062 { PNormalValue, MSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2063 { MNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2064 { MNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2065 { MNormalValue, PZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2066 { MNormalValue, MZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2067 { MNormalValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2070 { MNormalValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2072 { MNormalValue, PNormalValue, "-0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2073 { MNormalValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2074 { MNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2075 { MNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2076 { MNormalValue, PSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2077 { MNormalValue, MSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2078 { MNormalValue, PSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2079 { MNormalValue, MSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2080 { PLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2081 { PLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2082 { PLargestValue, PZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2083 { PLargestValue, MZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2084 { PLargestValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2087 { PLargestValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2089 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2090 { PLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2091 { PLargestValue, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2092 { PLargestValue, MLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2093 { PLargestValue, PSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2094 { PLargestValue, MSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2095 … { PLargestValue, PSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2096 … { PLargestValue, MSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2097 { MLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2098 { MLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2099 { MLargestValue, PZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2100 { MLargestValue, MZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2101 { MLargestValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2104 { MLargestValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2106 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2107 { MLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2108 { MLargestValue, PLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2109 { MLargestValue, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2110 { MLargestValue, PSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2111 { MLargestValue, MSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2112 … { MLargestValue, PSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2113 … { MLargestValue, MSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2114 { PSmallestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2115 { PSmallestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2116 { PSmallestValue, PZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2117 { PSmallestValue, MZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2118 { PSmallestValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2121 { PSmallestValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2123 { PSmallestValue, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2124 { PSmallestValue, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2125 { PSmallestValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2126 { PSmallestValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2127 { PSmallestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2128 { PSmallestValue, MSmallestValue, "0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2129 { PSmallestValue, PSmallestNormalized, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2130 { PSmallestValue, MSmallestNormalized, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2131 { MSmallestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2132 { MSmallestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2133 { MSmallestValue, PZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2134 { MSmallestValue, MZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2135 { MSmallestValue, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2138 { MSmallestValue, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2140 { MSmallestValue, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2141 { MSmallestValue, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2142 { MSmallestValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2143 { MSmallestValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2144 { MSmallestValue, PSmallestValue, "-0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2145 { MSmallestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2146 { MSmallestValue, PSmallestNormalized, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2147 { MSmallestValue, MSmallestNormalized, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2148 { PSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2149 { PSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2150 { PSmallestNormalized, PZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2151 { PSmallestNormalized, MZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2152 { PSmallestNormalized, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2155 { PSmallestNormalized, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2157 { PSmallestNormalized, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2158 { PSmallestNormalized, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2159 … { PSmallestNormalized, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2160 … { PSmallestNormalized, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2161 { PSmallestNormalized, PSmallestValue, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2162 { PSmallestNormalized, MSmallestValue, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2163 { PSmallestNormalized, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2164 { PSmallestNormalized, MSmallestNormalized, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
2165 { MSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2166 { MSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2167 { MSmallestNormalized, PZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2168 { MSmallestNormalized, MZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2169 { MSmallestNormalized, QNaN, "-nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2172 { MSmallestNormalized, SNaN, "-nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2174 { MSmallestNormalized, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2175 { MSmallestNormalized, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2176 … { MSmallestNormalized, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2177 … { MSmallestNormalized, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2178 { MSmallestNormalized, PSmallestValue, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2179 { MSmallestNormalized, MSmallestValue, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2180 { MSmallestNormalized, PSmallestNormalized, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
2181 { MSmallestNormalized, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero } in TEST()
2185 APFloat x(SpecialCaseTests[i].x); in TEST()
2186 APFloat y(SpecialCaseTests[i].y); in TEST()
2187 APFloat::opStatus status = x.subtract(y, APFloat::rmNearestTiesToEven); in TEST()
2189 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result); in TEST()
2205 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
2206 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
2207 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
2208 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
2209 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
2210 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
2211 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
2212 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
2213 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false); in TEST()
2214 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true); in TEST()
2215 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
2216 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
2217 APFloat PSmallestNormalized = in TEST()
2218 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
2219 APFloat MSmallestNormalized = in TEST()
2220 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
2222 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2223 const int UnderflowStatus = APFloat::opUnderflow | APFloat::opInexact; in TEST()
2227 APFloat x; in TEST()
2228 APFloat y; in TEST()
2233 { PInf, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2234 { PInf, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2235 { PInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2236 { PInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2237 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2240 { PInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2242 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2243 { PInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2244 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2245 { PInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2246 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2247 { PInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2248 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2249 { PInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2250 { MInf, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2251 { MInf, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2252 { MInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2253 { MInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2254 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2257 { MInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2259 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2260 { MInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2261 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2262 { MInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2263 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2264 { MInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2265 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2266 { MInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2267 { PZero, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2268 { PZero, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2269 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2270 { PZero, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2271 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2274 { PZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2276 { PZero, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2277 { PZero, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2278 { PZero, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2279 { PZero, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2280 { PZero, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2281 { PZero, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2282 { PZero, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2283 { PZero, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2284 { MZero, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2285 { MZero, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2286 { MZero, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2287 { MZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2288 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2291 { MZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2293 { MZero, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2294 { MZero, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2295 { MZero, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2296 { MZero, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2297 { MZero, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2298 { MZero, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2299 { MZero, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2300 { MZero, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2301 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2302 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2303 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2304 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2305 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2308 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2310 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2311 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2312 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2313 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2314 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2315 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2316 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2317 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2320 { SNaN, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2321 { SNaN, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2322 { SNaN, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2323 { SNaN, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2324 { SNaN, QNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2325 { SNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2326 { SNaN, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2327 { SNaN, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2328 { SNaN, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2329 { SNaN, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2330 { SNaN, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2331 { SNaN, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2332 { SNaN, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2333 { SNaN, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2335 { PNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2336 { PNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2337 { PNormalValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2338 { PNormalValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2339 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2342 { PNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2344 { PNormalValue, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2345 { PNormalValue, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2346 { PNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2347 { PNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2348 { PNormalValue, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2349 { PNormalValue, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2350 { PNormalValue, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2351 { PNormalValue, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2352 { MNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2353 { MNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2354 { MNormalValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2355 { MNormalValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2356 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2359 { MNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2361 { MNormalValue, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2362 { MNormalValue, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2363 { MNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2364 { MNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2365 { MNormalValue, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2366 { MNormalValue, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2367 { MNormalValue, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2368 { MNormalValue, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2369 { PLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2370 { PLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2371 { PLargestValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2372 { PLargestValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2373 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2376 { PLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2378 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2379 { PLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2380 { PLargestValue, PLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2381 { PLargestValue, MLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2382 { PLargestValue, PSmallestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2383 { PLargestValue, MSmallestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2384 { PLargestValue, PSmallestNormalized, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2385 { PLargestValue, MSmallestNormalized, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2386 { MLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2387 { MLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2388 { MLargestValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2389 { MLargestValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2390 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2393 { MLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2395 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2396 { MLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2397 { MLargestValue, PLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2398 { MLargestValue, MLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2399 { MLargestValue, PSmallestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2400 { MLargestValue, MSmallestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2401 { MLargestValue, PSmallestNormalized, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2402 { MLargestValue, MSmallestNormalized, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2403 { PSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2404 { PSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2405 { PSmallestValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2406 { PSmallestValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2407 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2410 { PSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2412 { PSmallestValue, PNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2413 { PSmallestValue, MNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2414 { PSmallestValue, PLargestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2415 { PSmallestValue, MLargestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2416 { PSmallestValue, PSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2417 { PSmallestValue, MSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2418 { PSmallestValue, PSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2419 { PSmallestValue, MSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2420 { MSmallestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2421 { MSmallestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2422 { MSmallestValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2423 { MSmallestValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2424 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2427 { MSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2429 { MSmallestValue, PNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2430 { MSmallestValue, MNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2431 { MSmallestValue, PLargestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2432 { MSmallestValue, MLargestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2433 { MSmallestValue, PSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2434 { MSmallestValue, MSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2435 { MSmallestValue, PSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2436 { MSmallestValue, MSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2437 { PSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2438 { PSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2439 { PSmallestNormalized, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2440 { PSmallestNormalized, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2441 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2444 { PSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2446 { PSmallestNormalized, PNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2447 { PSmallestNormalized, MNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2448 { PSmallestNormalized, PLargestValue, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2449 { PSmallestNormalized, MLargestValue, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2450 { PSmallestNormalized, PSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2451 { PSmallestNormalized, MSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2452 { PSmallestNormalized, PSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2453 { PSmallestNormalized, MSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2454 { MSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2455 { MSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2456 { MSmallestNormalized, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2457 { MSmallestNormalized, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2458 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2461 { MSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2463 { MSmallestNormalized, PNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2464 { MSmallestNormalized, MNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2465 { MSmallestNormalized, PLargestValue, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2466 { MSmallestNormalized, MLargestValue, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2467 { MSmallestNormalized, PSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2468 { MSmallestNormalized, MSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2469 { MSmallestNormalized, PSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2470 { MSmallestNormalized, MSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero } in TEST()
2474 APFloat x(SpecialCaseTests[i].x); in TEST()
2475 APFloat y(SpecialCaseTests[i].y); in TEST()
2476 APFloat::opStatus status = x.multiply(y, APFloat::rmNearestTiesToEven); in TEST()
2478 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result); in TEST()
2494 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
2495 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
2496 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
2497 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
2498 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
2499 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
2500 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
2501 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
2502 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false); in TEST()
2503 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true); in TEST()
2504 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
2505 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
2506 APFloat PSmallestNormalized = in TEST()
2507 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
2508 APFloat MSmallestNormalized = in TEST()
2509 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
2511 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2512 const int UnderflowStatus = APFloat::opUnderflow | APFloat::opInexact; in TEST()
2516 APFloat x; in TEST()
2517 APFloat y; in TEST()
2522 { PInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2523 { PInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2524 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2525 { PInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2526 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2529 { PInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2531 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2532 { PInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2533 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2534 { PInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2535 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2536 { PInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2537 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2538 { PInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2539 { MInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2540 { MInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2541 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2542 { MInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2543 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2546 { MInf, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2548 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2549 { MInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2550 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2551 { MInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2552 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2553 { MInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2554 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2555 { MInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2556 { PZero, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2557 { PZero, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2558 { PZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2559 { PZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2560 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2563 { PZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2565 { PZero, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2566 { PZero, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2567 { PZero, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2568 { PZero, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2569 { PZero, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2570 { PZero, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2571 { PZero, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2572 { PZero, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2573 { MZero, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2574 { MZero, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2575 { MZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2576 { MZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2577 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2580 { MZero, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2582 { MZero, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2583 { MZero, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2584 { MZero, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2585 { MZero, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2586 { MZero, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2587 { MZero, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2588 { MZero, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2589 { MZero, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2590 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2591 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2592 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2593 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2594 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2597 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2599 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2600 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2601 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2602 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2603 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2604 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2605 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2606 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2609 { SNaN, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2610 { SNaN, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2611 { SNaN, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2612 { SNaN, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2613 { SNaN, QNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2614 { SNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2615 { SNaN, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2616 { SNaN, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2617 { SNaN, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2618 { SNaN, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2619 { SNaN, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2620 { SNaN, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2621 { SNaN, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2622 { SNaN, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2624 { PNormalValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2625 { PNormalValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2626 { PNormalValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2627 { PNormalValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2628 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2631 { PNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2633 { PNormalValue, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2634 { PNormalValue, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2635 { PNormalValue, PLargestValue, "0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2636 { PNormalValue, MLargestValue, "-0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2637 { PNormalValue, PSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2638 { PNormalValue, MSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2639 { PNormalValue, PSmallestNormalized, "0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2640 { PNormalValue, MSmallestNormalized, "-0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2641 { MNormalValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2642 { MNormalValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2643 { MNormalValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2644 { MNormalValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2645 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2648 { MNormalValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2650 { MNormalValue, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2651 { MNormalValue, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2652 { MNormalValue, PLargestValue, "-0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2653 { MNormalValue, MLargestValue, "0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2654 { MNormalValue, PSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2655 { MNormalValue, MSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2656 { MNormalValue, PSmallestNormalized, "-0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2657 { MNormalValue, MSmallestNormalized, "0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2658 { PLargestValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2659 { PLargestValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2660 { PLargestValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2661 { PLargestValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2662 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2665 { PLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2667 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2668 { PLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2669 { PLargestValue, PLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2670 { PLargestValue, MLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2671 { PLargestValue, PSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2672 { PLargestValue, MSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2673 { PLargestValue, PSmallestNormalized, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2674 { PLargestValue, MSmallestNormalized, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2675 { MLargestValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2676 { MLargestValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2677 { MLargestValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2678 { MLargestValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2679 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2682 { MLargestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2684 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2685 { MLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2686 { MLargestValue, PLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2687 { MLargestValue, MLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2688 { MLargestValue, PSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2689 { MLargestValue, MSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2690 { MLargestValue, PSmallestNormalized, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2691 { MLargestValue, MSmallestNormalized, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2692 { PSmallestValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2693 { PSmallestValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2694 { PSmallestValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2695 { PSmallestValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2696 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2699 { PSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2701 { PSmallestValue, PNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2702 { PSmallestValue, MNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2703 { PSmallestValue, PLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2704 { PSmallestValue, MLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2705 { PSmallestValue, PSmallestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2706 { PSmallestValue, MSmallestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2707 { PSmallestValue, PSmallestNormalized, "0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2708 { PSmallestValue, MSmallestNormalized, "-0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2709 { MSmallestValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2710 { MSmallestValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2711 { MSmallestValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2712 { MSmallestValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2713 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2716 { MSmallestValue, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2718 { MSmallestValue, PNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2719 { MSmallestValue, MNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2720 { MSmallestValue, PLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2721 { MSmallestValue, MLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2722 { MSmallestValue, PSmallestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2723 { MSmallestValue, MSmallestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2724 { MSmallestValue, PSmallestNormalized, "-0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2725 { MSmallestValue, MSmallestNormalized, "0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2726 { PSmallestNormalized, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2727 { PSmallestNormalized, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2728 { PSmallestNormalized, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2729 { PSmallestNormalized, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2730 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2733 { PSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2735 { PSmallestNormalized, PNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2736 { PSmallestNormalized, MNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2737 { PSmallestNormalized, PLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2738 { PSmallestNormalized, MLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2739 { PSmallestNormalized, PSmallestValue, "0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2740 { PSmallestNormalized, MSmallestValue, "-0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2741 { PSmallestNormalized, PSmallestNormalized, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2742 { PSmallestNormalized, MSmallestNormalized, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2743 { MSmallestNormalized, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2744 { MSmallestNormalized, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2745 { MSmallestNormalized, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2746 { MSmallestNormalized, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2747 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2750 { MSmallestNormalized, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2752 { MSmallestNormalized, PNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2753 { MSmallestNormalized, MNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2754 { MSmallestNormalized, PLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2755 { MSmallestNormalized, MLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2756 { MSmallestNormalized, PSmallestValue, "-0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2757 { MSmallestNormalized, MSmallestValue, "0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2758 { MSmallestNormalized, PSmallestNormalized, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2759 { MSmallestNormalized, MSmallestNormalized, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2763 APFloat x(SpecialCaseTests[i].x); in TEST()
2764 APFloat y(SpecialCaseTests[i].y); in TEST()
2765 APFloat::opStatus status = x.divide(y, APFloat::rmNearestTiesToEven); in TEST()
2767 APFloat result(APFloat::IEEEsingle, SpecialCaseTests[i].result); in TEST()
2777 APFloat One = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
2778 APFloat Two = APFloat(APFloat::IEEEsingle, "0x2p+0"); in TEST()
2786 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
2787 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
2788 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
2789 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
2790 APFloat PQNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
2791 APFloat MQNaN = APFloat::getNaN(APFloat::IEEEsingle, true); in TEST()
2792 APFloat PSNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
2793 APFloat MSNaN = APFloat::getSNaN(APFloat::IEEEsingle, true); in TEST()
2794 APFloat PNormalValue = APFloat(APFloat::IEEEsingle, "0x1p+0"); in TEST()
2795 APFloat MNormalValue = APFloat(APFloat::IEEEsingle, "-0x1p+0"); in TEST()
2796 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle, false); in TEST()
2797 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle, true); in TEST()
2798 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, false); in TEST()
2799 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle, true); in TEST()
2800 APFloat PSmallestNormalized = in TEST()
2801 APFloat::getSmallestNormalized(APFloat::IEEEsingle, false); in TEST()
2802 APFloat MSmallestNormalized = in TEST()
2803 APFloat::getSmallestNormalized(APFloat::IEEEsingle, true); in TEST()
2824 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle, "0x1p+0"))); in TEST()
2825 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle, "-0x1p+0"))); in TEST()
2826 EXPECT_EQ(42, ilogb(APFloat(APFloat::IEEEsingle, "0x1p+42"))); in TEST()
2827 EXPECT_EQ(-42, ilogb(APFloat(APFloat::IEEEsingle, "0x1p-42"))); in TEST()
2829 EXPECT_EQ(APFloat::IEK_Inf, in TEST()
2830 ilogb(APFloat::getInf(APFloat::IEEEsingle, false))); in TEST()
2831 EXPECT_EQ(APFloat::IEK_Inf, in TEST()
2832 ilogb(APFloat::getInf(APFloat::IEEEsingle, true))); in TEST()
2833 EXPECT_EQ(APFloat::IEK_Zero, in TEST()
2834 ilogb(APFloat::getZero(APFloat::IEEEsingle, false))); in TEST()
2835 EXPECT_EQ(APFloat::IEK_Zero, in TEST()
2836 ilogb(APFloat::getZero(APFloat::IEEEsingle, true))); in TEST()
2837 EXPECT_EQ(APFloat::IEK_NaN, in TEST()
2838 ilogb(APFloat::getNaN(APFloat::IEEEsingle, false))); in TEST()
2839 EXPECT_EQ(APFloat::IEK_NaN, in TEST()
2840 ilogb(APFloat::getSNaN(APFloat::IEEEsingle, false))); in TEST()
2842 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle, false))); in TEST()
2843 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle, true))); in TEST()
2844 EXPECT_EQ(-126, ilogb(APFloat::getSmallest(APFloat::IEEEsingle, false))); in TEST()
2845 EXPECT_EQ(-126, ilogb(APFloat::getSmallest(APFloat::IEEEsingle, true))); in TEST()
2847 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle, false))); in TEST()
2849 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle, true))); in TEST()
2854 APFloat(APFloat::IEEEsingle, "0x1p+0") in TEST()
2855 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 0))); in TEST()
2857 APFloat(APFloat::IEEEsingle, "0x1p+42") in TEST()
2858 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 42))); in TEST()
2860 APFloat(APFloat::IEEEsingle, "0x1p-42") in TEST()
2861 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), -42))); in TEST()
2863 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle, false); in TEST()
2864 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle, true); in TEST()
2865 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle, false); in TEST()
2866 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle, true); in TEST()
2867 APFloat QPNaN = APFloat::getNaN(APFloat::IEEEsingle, false); in TEST()
2868 APFloat QMNaN = APFloat::getNaN(APFloat::IEEEsingle, true); in TEST()
2869 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle, false); in TEST()
2880 PInf.bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), 128))); in TEST()
2882 scalbn(APFloat(APFloat::IEEEsingle, "-0x1p+0"), 128))); in TEST()
2884 PInf.bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle, "0x1p+127"), 1))); in TEST()
2886 scalbn(APFloat(APFloat::IEEEsingle, "0x1p+0"), -127))); in TEST()
2888 scalbn(APFloat(APFloat::IEEEsingle, "-0x1p+0"), -127))); in TEST()
2890 scalbn(APFloat(APFloat::IEEEsingle, "0x1p-126"), -1))); in TEST()
2892 scalbn(APFloat(APFloat::IEEEsingle, "0x1p-126"), -1))); in TEST()