Lines Matching refs:APFloat
24 llvm::APFloat F(0.0); in convertToErrorFromString()
26 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToErrorFromString()
32 llvm::APFloat F(0.0); in convertToDoubleFromString()
34 F.convertFromString(Str, llvm::APFloat::rmNearestTiesToEven); in convertToDoubleFromString()
43 llvm::APFloat F(d); in convertToString()
55 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST()
56 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true).isSignaling()); in TEST()
57 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), false, &payload).isSignaling()); in TEST()
58 EXPECT_FALSE(APFloat::getQNaN(APFloat::IEEEsingle(), true, &payload).isSignaling()); in TEST()
59 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isSignaling()); in TEST()
60 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), true).isSignaling()); in TEST()
61 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false, &payload).isSignaling()); in TEST()
62 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), true, &payload).isSignaling()); in TEST()
67 APFloat test(APFloat::IEEEquad(), APFloat::uninitialized); in TEST()
68 APFloat expected(APFloat::IEEEquad(), APFloat::uninitialized); in TEST()
86 test = APFloat::getInf(APFloat::IEEEquad(), false); in TEST()
87 expected = APFloat::getInf(APFloat::IEEEquad(), false); in TEST()
88 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
94 test = APFloat::getInf(APFloat::IEEEquad(), false); in TEST()
95 expected = APFloat::getLargest(APFloat::IEEEquad(), false); in TEST()
96 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
101 test = APFloat::getInf(APFloat::IEEEquad(), true); in TEST()
102 expected = APFloat::getLargest(APFloat::IEEEquad(), true); in TEST()
103 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
108 test = APFloat::getInf(APFloat::IEEEquad(), true); in TEST()
109 expected = APFloat::getInf(APFloat::IEEEquad(), true); in TEST()
110 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
115 test = APFloat::getLargest(APFloat::IEEEquad(), false); in TEST()
116 expected = APFloat::getInf(APFloat::IEEEquad(), false); in TEST()
117 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
124 test = APFloat::getLargest(APFloat::IEEEquad(), false); in TEST()
125 expected = APFloat(APFloat::IEEEquad(), in TEST()
127 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
132 test = APFloat::getLargest(APFloat::IEEEquad(), true); in TEST()
133 expected = APFloat(APFloat::IEEEquad(), in TEST()
135 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
139 test = APFloat::getLargest(APFloat::IEEEquad(), true); in TEST()
140 expected = APFloat::getInf(APFloat::IEEEquad(), true); in TEST()
141 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
146 test = APFloat(APFloat::IEEEquad(), "0x0.0000000000000000000000000001p-16382"); in TEST()
147 expected = APFloat(APFloat::IEEEquad(), in TEST()
149 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
153 test = APFloat(APFloat::IEEEquad(), "0x0.0000000000000000000000000001p-16382"); in TEST()
154 expected = APFloat::getZero(APFloat::IEEEquad(), false); in TEST()
155 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
160 test = APFloat(APFloat::IEEEquad(), "-0x0.0000000000000000000000000001p-16382"); in TEST()
161 expected = APFloat::getZero(APFloat::IEEEquad(), true); in TEST()
162 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
167 test = APFloat(APFloat::IEEEquad(), "-0x0.0000000000000000000000000001p-16382"); in TEST()
168 expected = APFloat(APFloat::IEEEquad(), in TEST()
170 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
174 test = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
175 expected = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
176 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
180 test = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
181 expected = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
182 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
186 test = APFloat::getSNaN(APFloat::IEEEquad(), false); in TEST()
187 expected = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
188 EXPECT_EQ(test.next(false), APFloat::opInvalidOp); in TEST()
192 test = APFloat::getSNaN(APFloat::IEEEquad(), false); in TEST()
193 expected = APFloat::getQNaN(APFloat::IEEEquad(), false); in TEST()
194 EXPECT_EQ(test.next(true), APFloat::opInvalidOp); in TEST()
198 test = APFloat::getZero(APFloat::IEEEquad(), false); in TEST()
199 expected = APFloat::getSmallest(APFloat::IEEEquad(), false); in TEST()
200 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
204 test = APFloat::getZero(APFloat::IEEEquad(), false); in TEST()
205 expected = APFloat::getSmallest(APFloat::IEEEquad(), true); in TEST()
206 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
210 test = APFloat::getZero(APFloat::IEEEquad(), true); in TEST()
211 expected = APFloat::getSmallest(APFloat::IEEEquad(), false); in TEST()
212 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
216 test = APFloat::getZero(APFloat::IEEEquad(), true); in TEST()
217 expected = APFloat::getSmallest(APFloat::IEEEquad(), true); in TEST()
218 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
230 test = APFloat(APFloat::IEEEquad(), "0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
231 expected = APFloat(APFloat::IEEEquad(), in TEST()
233 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
238 test = APFloat(APFloat::IEEEquad(), in TEST()
240 expected = APFloat(APFloat::IEEEquad(), in TEST()
242 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
247 test = APFloat(APFloat::IEEEquad(), in TEST()
249 expected = APFloat(APFloat::IEEEquad(), in TEST()
251 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
256 test = APFloat(APFloat::IEEEquad(), in TEST()
258 expected = APFloat(APFloat::IEEEquad(), in TEST()
260 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
271 test = APFloat(APFloat::IEEEquad(), "-0x1p+1"); in TEST()
272 expected = APFloat(APFloat::IEEEquad(), in TEST()
274 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
278 test = APFloat(APFloat::IEEEquad(), "0x1p+1"); in TEST()
279 expected = APFloat(APFloat::IEEEquad(), "0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
280 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
284 test = APFloat(APFloat::IEEEquad(), "0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
285 expected = APFloat(APFloat::IEEEquad(), "0x1p+1"); in TEST()
286 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
290 test = APFloat(APFloat::IEEEquad(), "-0x1.ffffffffffffffffffffffffffffp+0"); in TEST()
291 expected = APFloat(APFloat::IEEEquad(), "-0x1p+1"); in TEST()
292 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
307 test = APFloat(APFloat::IEEEquad(), "-0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
308 expected = APFloat(APFloat::IEEEquad(), in TEST()
310 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
316 test = APFloat(APFloat::IEEEquad(), "0x0.ffffffffffffffffffffffffffffp-16382"); in TEST()
317 expected = APFloat(APFloat::IEEEquad(), in TEST()
319 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
325 test = APFloat(APFloat::IEEEquad(), "0x1.0000000000000000000000000000p-16382"); in TEST()
326 expected = APFloat(APFloat::IEEEquad(), in TEST()
328 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
334 test = APFloat(APFloat::IEEEquad(), "-0x1.0000000000000000000000000000p-16382"); in TEST()
335 expected = APFloat(APFloat::IEEEquad(), in TEST()
337 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
352 test = APFloat(APFloat::IEEEquad(), "-0x1p-16381"); in TEST()
353 expected = APFloat(APFloat::IEEEquad(), in TEST()
355 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
360 test = APFloat(APFloat::IEEEquad(), "-0x1.ffffffffffffffffffffffffffffp-16382"); in TEST()
361 expected = APFloat(APFloat::IEEEquad(), "-0x1p-16381"); in TEST()
362 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
366 test = APFloat(APFloat::IEEEquad(), "0x1.ffffffffffffffffffffffffffffp-16382"); in TEST()
367 expected = APFloat(APFloat::IEEEquad(), "0x1p-16381"); in TEST()
368 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
372 test = APFloat(APFloat::IEEEquad(), "0x1p-16381"); in TEST()
373 expected = APFloat(APFloat::IEEEquad(), in TEST()
375 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
390 test = APFloat(APFloat::IEEEquad(), in TEST()
392 expected = APFloat(APFloat::IEEEquad(), in TEST()
394 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
400 test = APFloat(APFloat::IEEEquad(), in TEST()
402 expected = APFloat(APFloat::IEEEquad(), in TEST()
404 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
410 test = APFloat(APFloat::IEEEquad(), in TEST()
412 expected = APFloat(APFloat::IEEEquad(), in TEST()
414 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
420 test = APFloat(APFloat::IEEEquad(), in TEST()
422 expected = APFloat(APFloat::IEEEquad(), in TEST()
424 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
430 test = APFloat(APFloat::IEEEquad(), in TEST()
432 expected = APFloat(APFloat::IEEEquad(), in TEST()
434 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
440 test = APFloat(APFloat::IEEEquad(), in TEST()
442 expected = APFloat(APFloat::IEEEquad(), in TEST()
444 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
450 test = APFloat(APFloat::IEEEquad(), in TEST()
452 expected = APFloat(APFloat::IEEEquad(), in TEST()
454 EXPECT_EQ(test.next(false), APFloat::opOK); in TEST()
460 test = APFloat(APFloat::IEEEquad(), in TEST()
462 expected = APFloat(APFloat::IEEEquad(), in TEST()
464 EXPECT_EQ(test.next(true), APFloat::opOK); in TEST()
471 APFloat::roundingMode rdmd = APFloat::rmNearestTiesToEven; in TEST()
474 APFloat f1(14.5f); in TEST()
475 APFloat f2(-14.5f); in TEST()
476 APFloat f3(225.0f); in TEST()
477 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
482 APFloat Val2(2.0f); in TEST()
483 APFloat f1((float)1.17549435e-38F); in TEST()
484 APFloat f2((float)1.17549435e-38F); in TEST()
487 APFloat f3(12.0f); in TEST()
488 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
495 APFloat f1(1.0); in TEST()
496 APFloat f2(-1.0); in TEST()
497 APFloat f3(1.0); in TEST()
498 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
506 APFloat f1(1.0); in TEST()
507 APFloat f2(-1.0); in TEST()
508 APFloat f3(1.0); in TEST()
509 f1.fusedMultiplyAdd(f2, f3, APFloat::rmTowardNegative); in TEST()
516 APFloat f1(0.0); in TEST()
517 APFloat f2(-0.0); in TEST()
518 APFloat f3(-0.0); in TEST()
519 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
525 APFloat f1(APFloat::IEEEdouble(), "-0x1p-1074"); in TEST()
526 APFloat f2(APFloat::IEEEdouble(), "+0x1p-1074"); in TEST()
527 APFloat f3(0.0); in TEST()
528 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
534 APFloat M1(APFloat::x87DoubleExtended(), 1); in TEST()
535 APFloat M2(APFloat::x87DoubleExtended(), 1); in TEST()
536 APFloat A(APFloat::x87DoubleExtended(), 3); in TEST()
539 M1.fusedMultiplyAdd(M1, A, APFloat::rmNearestTiesToEven); in TEST()
540 M1.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
547 APFloat f1(-8.85242279E-41f); in TEST()
548 APFloat f2(2.0f); in TEST()
549 APFloat f3(8.85242279E-41f); in TEST()
550 f1.fusedMultiplyAdd(f2, f3, APFloat::rmNearestTiesToEven); in TEST()
556 APFloat F(1.5); in TEST()
558 F.fusedMultiplyAdd(F, F, APFloat::rmNearestTiesToEven); in TEST()
564 APFloat f1(1.0); in TEST()
565 APFloat f2(2.0); in TEST()
566 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
575 APFloat f1(1.0); in TEST()
576 APFloat f2(2.0); in TEST()
577 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
586 APFloat f1(1.0); in TEST()
587 APFloat f2(2.0); in TEST()
588 APFloat zp(0.0); in TEST()
589 APFloat zn(-0.0); in TEST()
590 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
601 APFloat f1(1.0); in TEST()
602 APFloat f2(2.0); in TEST()
603 APFloat zp(0.0); in TEST()
604 APFloat zn(-0.0); in TEST()
605 APFloat nan = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
616 APFloat::roundingMode rdmd = APFloat::rmNearestTiesToEven; in TEST()
621 EXPECT_FALSE(APFloat(APFloat::IEEEsingle(), MinNormalStr).isDenormal()); in TEST()
622 EXPECT_FALSE(APFloat(APFloat::IEEEsingle(), 0).isDenormal()); in TEST()
624 APFloat Val2(APFloat::IEEEsingle(), 2); in TEST()
625 APFloat T(APFloat::IEEEsingle(), MinNormalStr); in TEST()
633 EXPECT_FALSE(APFloat(APFloat::IEEEdouble(), MinNormalStr).isDenormal()); in TEST()
634 EXPECT_FALSE(APFloat(APFloat::IEEEdouble(), 0).isDenormal()); in TEST()
636 APFloat Val2(APFloat::IEEEdouble(), 2); in TEST()
637 APFloat T(APFloat::IEEEdouble(), MinNormalStr); in TEST()
645 EXPECT_FALSE(APFloat(APFloat::x87DoubleExtended(), MinNormalStr).isDenormal()); in TEST()
646 EXPECT_FALSE(APFloat(APFloat::x87DoubleExtended(), 0).isDenormal()); in TEST()
648 APFloat Val2(APFloat::x87DoubleExtended(), 2); in TEST()
649 APFloat T(APFloat::x87DoubleExtended(), MinNormalStr); in TEST()
657 EXPECT_FALSE(APFloat(APFloat::IEEEquad(), MinNormalStr).isDenormal()); in TEST()
658 EXPECT_FALSE(APFloat(APFloat::IEEEquad(), 0).isDenormal()); in TEST()
660 APFloat Val2(APFloat::IEEEquad(), 2); in TEST()
661 APFloat T(APFloat::IEEEquad(), MinNormalStr); in TEST()
668 EXPECT_EQ(0.0f, APFloat(0.0f).convertToFloat()); in TEST()
669 EXPECT_EQ(-0.0f, APFloat(-0.0f).convertToFloat()); in TEST()
670 EXPECT_TRUE(APFloat(-0.0f).isNegative()); in TEST()
672 EXPECT_EQ(0.0, APFloat(0.0).convertToDouble()); in TEST()
673 EXPECT_EQ(-0.0, APFloat(-0.0).convertToDouble()); in TEST()
674 EXPECT_TRUE(APFloat(-0.0).isNegative()); in TEST()
689 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0").convertToDouble()); in TEST()
690 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0").convertToDouble()); in TEST()
691 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0").convertToDouble()); in TEST()
693 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.").convertToDouble()); in TEST()
694 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.").convertToDouble()); in TEST()
695 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.").convertToDouble()); in TEST()
697 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), ".0").convertToDouble()); in TEST()
698 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+.0").convertToDouble()); in TEST()
699 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-.0").convertToDouble()); in TEST()
701 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.0").convertToDouble()); in TEST()
702 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.0").convertToDouble()); in TEST()
703 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.0").convertToDouble()); in TEST()
705 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "00000.").convertToDouble()); in TEST()
706 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+00000.").convertToDouble()); in TEST()
707 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-00000.").convertToDouble()); in TEST()
709 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble(), ".00000").convertToDouble()); in TEST()
710 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+.00000").convertToDouble()); in TEST()
711 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-.00000").convertToDouble()); in TEST()
713 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0000.00000").convertToDouble()); in TEST()
714 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0000.00000").convertToDouble()); in TEST()
715 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0000.00000").convertToDouble()); in TEST()
719 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e1").convertToDouble()); in TEST()
720 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e1").convertToDouble()); in TEST()
721 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e1").convertToDouble()); in TEST()
723 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e+1").convertToDouble()); in TEST()
724 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e+1").convertToDouble()); in TEST()
725 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e+1").convertToDouble()); in TEST()
727 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e-1").convertToDouble()); in TEST()
728 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e-1").convertToDouble()); in TEST()
729 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e-1").convertToDouble()); in TEST()
732 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.e1").convertToDouble()); in TEST()
733 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.e1").convertToDouble()); in TEST()
734 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.e1").convertToDouble()); in TEST()
736 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.e+1").convertToDouble()); in TEST()
737 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.e+1").convertToDouble()); in TEST()
738 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.e+1").convertToDouble()); in TEST()
740 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.e-1").convertToDouble()); in TEST()
741 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.e-1").convertToDouble()); in TEST()
742 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.e-1").convertToDouble()); in TEST()
744 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), ".0e1").convertToDouble()); in TEST()
745 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+.0e1").convertToDouble()); in TEST()
746 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-.0e1").convertToDouble()); in TEST()
748 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), ".0e+1").convertToDouble()); in TEST()
749 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+.0e+1").convertToDouble()); in TEST()
750 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-.0e+1").convertToDouble()); in TEST()
752 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), ".0e-1").convertToDouble()); in TEST()
753 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+.0e-1").convertToDouble()); in TEST()
754 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-.0e-1").convertToDouble()); in TEST()
757 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.0e1").convertToDouble()); in TEST()
758 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.0e1").convertToDouble()); in TEST()
759 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.0e1").convertToDouble()); in TEST()
761 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.0e+1").convertToDouble()); in TEST()
762 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.0e+1").convertToDouble()); in TEST()
763 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.0e+1").convertToDouble()); in TEST()
765 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0.0e-1").convertToDouble()); in TEST()
766 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0.0e-1").convertToDouble()); in TEST()
767 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0.0e-1").convertToDouble()); in TEST()
770 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "000.0000e1").convertToDouble()); in TEST()
771 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+000.0000e+1").convertToDouble()); in TEST()
772 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-000.0000e+1").convertToDouble()); in TEST()
776 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e1234").convertToDouble()); in TEST()
777 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e1234").convertToDouble()); in TEST()
778 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e1234").convertToDouble()); in TEST()
780 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e+1234").convertToDouble()); in TEST()
781 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e+1234").convertToDouble()); in TEST()
782 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e+1234").convertToDouble()); in TEST()
784 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0e-1234").convertToDouble()); in TEST()
785 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0e-1234").convertToDouble()); in TEST()
786 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0e-1234").convertToDouble()); in TEST()
788 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble(), "000.0000e1234").convertToDouble()); in TEST()
789 EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble(), "000.0000e-1234").convertToDouble()); in TEST()
791 …EXPECT_EQ(0.0, APFloat(APFloat::IEEEdouble(), StringRef("0e1234" "\0" "2", 6)).convertToDouble()); in TEST()
795 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0p1").convertToDouble()); in TEST()
796 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0p1").convertToDouble()); in TEST()
797 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0p1").convertToDouble()); in TEST()
799 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0p+1").convertToDouble()); in TEST()
800 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0p+1").convertToDouble()); in TEST()
801 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0p+1").convertToDouble()); in TEST()
803 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0p-1").convertToDouble()); in TEST()
804 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0p-1").convertToDouble()); in TEST()
805 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0p-1").convertToDouble()); in TEST()
808 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.p1").convertToDouble()); in TEST()
809 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.p1").convertToDouble()); in TEST()
810 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.p1").convertToDouble()); in TEST()
812 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.p+1").convertToDouble()); in TEST()
813 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.p+1").convertToDouble()); in TEST()
814 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.p+1").convertToDouble()); in TEST()
816 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.p-1").convertToDouble()); in TEST()
817 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.p-1").convertToDouble()); in TEST()
818 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.p-1").convertToDouble()); in TEST()
821 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x.0p1").convertToDouble()); in TEST()
822 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x.0p1").convertToDouble()); in TEST()
823 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x.0p1").convertToDouble()); in TEST()
825 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x.0p+1").convertToDouble()); in TEST()
826 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x.0p+1").convertToDouble()); in TEST()
827 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x.0p+1").convertToDouble()); in TEST()
829 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x.0p-1").convertToDouble()); in TEST()
830 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x.0p-1").convertToDouble()); in TEST()
831 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x.0p-1").convertToDouble()); in TEST()
834 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.0p1").convertToDouble()); in TEST()
835 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.0p1").convertToDouble()); in TEST()
836 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.0p1").convertToDouble()); in TEST()
838 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.0p+1").convertToDouble()); in TEST()
839 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.0p+1").convertToDouble()); in TEST()
840 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.0p+1").convertToDouble()); in TEST()
842 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.0p-1").convertToDouble()); in TEST()
843 EXPECT_EQ(+0.0, APFloat(APFloat::IEEEdouble(), "+0x0.0p-1").convertToDouble()); in TEST()
844 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0.0p-1").convertToDouble()); in TEST()
847 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x00000.p1").convertToDouble()); in TEST()
848 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0000.00000p1").convertToDouble()); in TEST()
849 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x.00000p1").convertToDouble()); in TEST()
850 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.p1").convertToDouble()); in TEST()
851 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0p1234").convertToDouble()); in TEST()
852 EXPECT_EQ(-0.0, APFloat(APFloat::IEEEdouble(), "-0x0p1234").convertToDouble()); in TEST()
853 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x00000.p1234").convertToDouble()); in TEST()
854 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0000.00000p1234").convertToDouble()); in TEST()
855 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x.00000p1234").convertToDouble()); in TEST()
856 EXPECT_EQ( 0.0, APFloat(APFloat::IEEEdouble(), "0x0.p1234").convertToDouble()); in TEST()
860 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1").convertToDouble()); in TEST()
861 EXPECT_EQ(2.0, APFloat(APFloat::IEEEdouble(), "2.").convertToDouble()); in TEST()
862 EXPECT_EQ(0.5, APFloat(APFloat::IEEEdouble(), ".5").convertToDouble()); in TEST()
863 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1.0").convertToDouble()); in TEST()
864 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble(), "-2").convertToDouble()); in TEST()
865 EXPECT_EQ(-4.0, APFloat(APFloat::IEEEdouble(), "-4.").convertToDouble()); in TEST()
866 EXPECT_EQ(-0.5, APFloat(APFloat::IEEEdouble(), "-.5").convertToDouble()); in TEST()
867 EXPECT_EQ(-1.5, APFloat(APFloat::IEEEdouble(), "-1.5").convertToDouble()); in TEST()
868 EXPECT_EQ(1.25e12, APFloat(APFloat::IEEEdouble(), "1.25e12").convertToDouble()); in TEST()
869 EXPECT_EQ(1.25e+12, APFloat(APFloat::IEEEdouble(), "1.25e+12").convertToDouble()); in TEST()
870 EXPECT_EQ(1.25e-12, APFloat(APFloat::IEEEdouble(), "1.25e-12").convertToDouble()); in TEST()
871 EXPECT_EQ(1024.0, APFloat(APFloat::IEEEdouble(), "1024.").convertToDouble()); in TEST()
872 EXPECT_EQ(1024.05, APFloat(APFloat::IEEEdouble(), "1024.05000").convertToDouble()); in TEST()
873 EXPECT_EQ(0.05, APFloat(APFloat::IEEEdouble(), ".05000").convertToDouble()); in TEST()
874 EXPECT_EQ(2.0, APFloat(APFloat::IEEEdouble(), "2.").convertToDouble()); in TEST()
875 EXPECT_EQ(2.0e2, APFloat(APFloat::IEEEdouble(), "2.e2").convertToDouble()); in TEST()
876 EXPECT_EQ(2.0e+2, APFloat(APFloat::IEEEdouble(), "2.e+2").convertToDouble()); in TEST()
877 EXPECT_EQ(2.0e-2, APFloat(APFloat::IEEEdouble(), "2.e-2").convertToDouble()); in TEST()
878 EXPECT_EQ(2.05e2, APFloat(APFloat::IEEEdouble(), "002.05000e2").convertToDouble()); in TEST()
879 EXPECT_EQ(2.05e+2, APFloat(APFloat::IEEEdouble(), "002.05000e+2").convertToDouble()); in TEST()
880 EXPECT_EQ(2.05e-2, APFloat(APFloat::IEEEdouble(), "002.05000e-2").convertToDouble()); in TEST()
881 EXPECT_EQ(2.05e12, APFloat(APFloat::IEEEdouble(), "002.05000e12").convertToDouble()); in TEST()
882 EXPECT_EQ(2.05e+12, APFloat(APFloat::IEEEdouble(), "002.05000e+12").convertToDouble()); in TEST()
883 EXPECT_EQ(2.05e-12, APFloat(APFloat::IEEEdouble(), "002.05000e-12").convertToDouble()); in TEST()
885 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1e").convertToDouble()); in TEST()
886 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "+1e").convertToDouble()); in TEST()
887 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble(), "-1e").convertToDouble()); in TEST()
889 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1.e").convertToDouble()); in TEST()
890 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "+1.e").convertToDouble()); in TEST()
891 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble(), "-1.e").convertToDouble()); in TEST()
893 EXPECT_EQ(0.1, APFloat(APFloat::IEEEdouble(), ".1e").convertToDouble()); in TEST()
894 EXPECT_EQ(0.1, APFloat(APFloat::IEEEdouble(), "+.1e").convertToDouble()); in TEST()
895 EXPECT_EQ(-0.1, APFloat(APFloat::IEEEdouble(), "-.1e").convertToDouble()); in TEST()
897 EXPECT_EQ(1.1, APFloat(APFloat::IEEEdouble(), "1.1e").convertToDouble()); in TEST()
898 EXPECT_EQ(1.1, APFloat(APFloat::IEEEdouble(), "+1.1e").convertToDouble()); in TEST()
899 EXPECT_EQ(-1.1, APFloat(APFloat::IEEEdouble(), "-1.1e").convertToDouble()); in TEST()
901 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1e+").convertToDouble()); in TEST()
902 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1e-").convertToDouble()); in TEST()
904 EXPECT_EQ(0.1, APFloat(APFloat::IEEEdouble(), ".1e").convertToDouble()); in TEST()
905 EXPECT_EQ(0.1, APFloat(APFloat::IEEEdouble(), ".1e+").convertToDouble()); in TEST()
906 EXPECT_EQ(0.1, APFloat(APFloat::IEEEdouble(), ".1e-").convertToDouble()); in TEST()
908 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1.0e").convertToDouble()); in TEST()
909 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1.0e+").convertToDouble()); in TEST()
910 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "1.0e-").convertToDouble()); in TEST()
914 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "99e99999").isInfinity()); in TEST()
915 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-99e99999").isInfinity()); in TEST()
916 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "1e-99999").isPosZero()); in TEST()
917 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-1e-99999").isNegZero()); in TEST()
923 const fltSemantics &Sem = APFloat::IEEEdouble(); in TEST()
957 APFloat::getSNaN(Sem).bitcastToAPInt().getZExtValue() & PayloadMask; in TEST()
1004 APFloat F(Sem); in TEST()
1006 TestStr, llvm::APFloat::rmNearestTiesToEven); in TEST()
1024 APFloat F(Sem); in TEST()
1026 !F.convertFromString(InfStr, llvm::APFloat::rmNearestTiesToEven); in TEST()
1053 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble(), "0x1p0").convertToDouble()); in TEST()
1054 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble(), "+0x1p0").convertToDouble()); in TEST()
1055 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble(), "-0x1p0").convertToDouble()); in TEST()
1057 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble(), "0x1p+0").convertToDouble()); in TEST()
1058 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble(), "+0x1p+0").convertToDouble()); in TEST()
1059 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble(), "-0x1p+0").convertToDouble()); in TEST()
1061 EXPECT_EQ( 1.0, APFloat(APFloat::IEEEdouble(), "0x1p-0").convertToDouble()); in TEST()
1062 EXPECT_EQ(+1.0, APFloat(APFloat::IEEEdouble(), "+0x1p-0").convertToDouble()); in TEST()
1063 EXPECT_EQ(-1.0, APFloat(APFloat::IEEEdouble(), "-0x1p-0").convertToDouble()); in TEST()
1066 EXPECT_EQ( 2.0, APFloat(APFloat::IEEEdouble(), "0x1p1").convertToDouble()); in TEST()
1067 EXPECT_EQ(+2.0, APFloat(APFloat::IEEEdouble(), "+0x1p1").convertToDouble()); in TEST()
1068 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble(), "-0x1p1").convertToDouble()); in TEST()
1070 EXPECT_EQ( 2.0, APFloat(APFloat::IEEEdouble(), "0x1p+1").convertToDouble()); in TEST()
1071 EXPECT_EQ(+2.0, APFloat(APFloat::IEEEdouble(), "+0x1p+1").convertToDouble()); in TEST()
1072 EXPECT_EQ(-2.0, APFloat(APFloat::IEEEdouble(), "-0x1p+1").convertToDouble()); in TEST()
1074 EXPECT_EQ( 0.5, APFloat(APFloat::IEEEdouble(), "0x1p-1").convertToDouble()); in TEST()
1075 EXPECT_EQ(+0.5, APFloat(APFloat::IEEEdouble(), "+0x1p-1").convertToDouble()); in TEST()
1076 EXPECT_EQ(-0.5, APFloat(APFloat::IEEEdouble(), "-0x1p-1").convertToDouble()); in TEST()
1079 EXPECT_EQ( 3.0, APFloat(APFloat::IEEEdouble(), "0x1.8p1").convertToDouble()); in TEST()
1080 EXPECT_EQ(+3.0, APFloat(APFloat::IEEEdouble(), "+0x1.8p1").convertToDouble()); in TEST()
1081 EXPECT_EQ(-3.0, APFloat(APFloat::IEEEdouble(), "-0x1.8p1").convertToDouble()); in TEST()
1083 EXPECT_EQ( 3.0, APFloat(APFloat::IEEEdouble(), "0x1.8p+1").convertToDouble()); in TEST()
1084 EXPECT_EQ(+3.0, APFloat(APFloat::IEEEdouble(), "+0x1.8p+1").convertToDouble()); in TEST()
1085 EXPECT_EQ(-3.0, APFloat(APFloat::IEEEdouble(), "-0x1.8p+1").convertToDouble()); in TEST()
1087 EXPECT_EQ( 0.75, APFloat(APFloat::IEEEdouble(), "0x1.8p-1").convertToDouble()); in TEST()
1088 EXPECT_EQ(+0.75, APFloat(APFloat::IEEEdouble(), "+0x1.8p-1").convertToDouble()); in TEST()
1089 EXPECT_EQ(-0.75, APFloat(APFloat::IEEEdouble(), "-0x1.8p-1").convertToDouble()); in TEST()
1092 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble(), "0x1000.000p1").convertToDouble()); in TEST()
1093 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble(), "+0x1000.000p1").convertToDouble()); in TEST()
1094 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble(), "-0x1000.000p1").convertToDouble()); in TEST()
1096 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble(), "0x1000.000p+1").convertToDouble()); in TEST()
1097 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble(), "+0x1000.000p+1").convertToDouble()); in TEST()
1098 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble(), "-0x1000.000p+1").convertToDouble()); in TEST()
1100 EXPECT_EQ( 2048.0, APFloat(APFloat::IEEEdouble(), "0x1000.000p-1").convertToDouble()); in TEST()
1101 EXPECT_EQ(+2048.0, APFloat(APFloat::IEEEdouble(), "+0x1000.000p-1").convertToDouble()); in TEST()
1102 EXPECT_EQ(-2048.0, APFloat(APFloat::IEEEdouble(), "-0x1000.000p-1").convertToDouble()); in TEST()
1105 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble(), "0x1000p1").convertToDouble()); in TEST()
1106 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble(), "+0x1000p1").convertToDouble()); in TEST()
1107 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble(), "-0x1000p1").convertToDouble()); in TEST()
1109 EXPECT_EQ( 8192.0, APFloat(APFloat::IEEEdouble(), "0x1000p+1").convertToDouble()); in TEST()
1110 EXPECT_EQ(+8192.0, APFloat(APFloat::IEEEdouble(), "+0x1000p+1").convertToDouble()); in TEST()
1111 EXPECT_EQ(-8192.0, APFloat(APFloat::IEEEdouble(), "-0x1000p+1").convertToDouble()); in TEST()
1113 EXPECT_EQ( 2048.0, APFloat(APFloat::IEEEdouble(), "0x1000p-1").convertToDouble()); in TEST()
1114 EXPECT_EQ(+2048.0, APFloat(APFloat::IEEEdouble(), "+0x1000p-1").convertToDouble()); in TEST()
1115 EXPECT_EQ(-2048.0, APFloat(APFloat::IEEEdouble(), "-0x1000p-1").convertToDouble()); in TEST()
1118 EXPECT_EQ( 16384.0, APFloat(APFloat::IEEEdouble(), "0x10p10").convertToDouble()); in TEST()
1119 EXPECT_EQ(+16384.0, APFloat(APFloat::IEEEdouble(), "+0x10p10").convertToDouble()); in TEST()
1120 EXPECT_EQ(-16384.0, APFloat(APFloat::IEEEdouble(), "-0x10p10").convertToDouble()); in TEST()
1122 EXPECT_EQ( 16384.0, APFloat(APFloat::IEEEdouble(), "0x10p+10").convertToDouble()); in TEST()
1123 EXPECT_EQ(+16384.0, APFloat(APFloat::IEEEdouble(), "+0x10p+10").convertToDouble()); in TEST()
1124 EXPECT_EQ(-16384.0, APFloat(APFloat::IEEEdouble(), "-0x10p+10").convertToDouble()); in TEST()
1126 EXPECT_EQ( 0.015625, APFloat(APFloat::IEEEdouble(), "0x10p-10").convertToDouble()); in TEST()
1127 EXPECT_EQ(+0.015625, APFloat(APFloat::IEEEdouble(), "+0x10p-10").convertToDouble()); in TEST()
1128 EXPECT_EQ(-0.015625, APFloat(APFloat::IEEEdouble(), "-0x10p-10").convertToDouble()); in TEST()
1130 EXPECT_EQ(1.0625, APFloat(APFloat::IEEEdouble(), "0x1.1p0").convertToDouble()); in TEST()
1131 EXPECT_EQ(1.0, APFloat(APFloat::IEEEdouble(), "0x1p0").convertToDouble()); in TEST()
1172 APFloat UnnormalZero(APFloat::x87DoubleExtended(), APInt(80, {0, 1})); in TEST()
1182 EXPECT_EQ(APFloat::opOK, in TEST()
1183 APFloat(APFloat::IEEEdouble(), "10") in TEST()
1184 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1188 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
1189 APFloat(APFloat::IEEEdouble(), "-10") in TEST()
1190 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1194 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
1195 APFloat(APFloat::IEEEdouble(), "32") in TEST()
1196 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1200 EXPECT_EQ(APFloat::opInexact, in TEST()
1201 APFloat(APFloat::IEEEdouble(), "7.9") in TEST()
1202 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1207 EXPECT_EQ(APFloat::opOK, in TEST()
1208 APFloat(APFloat::IEEEdouble(), "-10") in TEST()
1209 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1213 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
1214 APFloat(APFloat::IEEEdouble(), "-17") in TEST()
1215 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1219 EXPECT_EQ(APFloat::opInvalidOp, in TEST()
1220 APFloat(APFloat::IEEEdouble(), "16") in TEST()
1221 .convertToInteger(result, APFloat::rmTowardZero, &isExact)); in TEST()
1230 return APFloat::getSNaN(Sem, Negative, &appayload).bitcastToAPInt(); in nanbitsFromAPInt()
1232 return APFloat::getQNaN(Sem, Negative, &appayload).bitcastToAPInt(); in nanbitsFromAPInt()
1244 { 0x7fc00000ULL, APFloat::IEEEsingle(), false, false, 0x00000000ULL }, in TEST()
1245 { 0xffc00000ULL, APFloat::IEEEsingle(), false, true, 0x00000000ULL }, in TEST()
1246 { 0x7fc0ae72ULL, APFloat::IEEEsingle(), false, false, 0x0000ae72ULL }, in TEST()
1247 { 0x7fffae72ULL, APFloat::IEEEsingle(), false, false, 0xffffae72ULL }, in TEST()
1248 { 0x7fdaae72ULL, APFloat::IEEEsingle(), false, false, 0x00daae72ULL }, in TEST()
1249 { 0x7fa00000ULL, APFloat::IEEEsingle(), true, false, 0x00000000ULL }, in TEST()
1250 { 0xffa00000ULL, APFloat::IEEEsingle(), true, true, 0x00000000ULL }, in TEST()
1251 { 0x7f80ae72ULL, APFloat::IEEEsingle(), true, false, 0x0000ae72ULL }, in TEST()
1252 { 0x7fbfae72ULL, APFloat::IEEEsingle(), true, false, 0xffffae72ULL }, in TEST()
1253 { 0x7f9aae72ULL, APFloat::IEEEsingle(), true, false, 0x001aae72ULL }, in TEST()
1254 { 0x7ff8000000000000ULL, APFloat::IEEEdouble(), false, false, 0x0000000000000000ULL }, in TEST()
1255 { 0xfff8000000000000ULL, APFloat::IEEEdouble(), false, true, 0x0000000000000000ULL }, in TEST()
1256 { 0x7ff800000000ae72ULL, APFloat::IEEEdouble(), false, false, 0x000000000000ae72ULL }, in TEST()
1257 { 0x7fffffffffffae72ULL, APFloat::IEEEdouble(), false, false, 0xffffffffffffae72ULL }, in TEST()
1258 { 0x7ffdaaaaaaaaae72ULL, APFloat::IEEEdouble(), false, false, 0x000daaaaaaaaae72ULL }, in TEST()
1259 { 0x7ff4000000000000ULL, APFloat::IEEEdouble(), true, false, 0x0000000000000000ULL }, in TEST()
1260 { 0xfff4000000000000ULL, APFloat::IEEEdouble(), true, true, 0x0000000000000000ULL }, in TEST()
1261 { 0x7ff000000000ae72ULL, APFloat::IEEEdouble(), true, false, 0x000000000000ae72ULL }, in TEST()
1262 { 0x7ff7ffffffffae72ULL, APFloat::IEEEdouble(), true, false, 0xffffffffffffae72ULL }, in TEST()
1263 { 0x7ff1aaaaaaaaae72ULL, APFloat::IEEEdouble(), true, false, 0x0001aaaaaaaaae72ULL }, in TEST()
1274 …EXPECT_DEATH(APFloat(APFloat::IEEEsingle(), 0).convertToDouble(), "Float semantics are not IEEEdou… in TEST()
1275 …EXPECT_DEATH(APFloat(APFloat::IEEEdouble(), 0).convertToFloat(), "Float semantics are not IEEEsin… in TEST()
1445 APFloat inv(0.0f); in TEST()
1448 EXPECT_TRUE(APFloat(2.0).getExactInverse(&inv)); in TEST()
1449 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(0.5))); in TEST()
1450 EXPECT_TRUE(APFloat(2.0f).getExactInverse(&inv)); in TEST()
1451 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(0.5f))); in TEST()
1452 EXPECT_TRUE(APFloat(APFloat::IEEEquad(), "2.0").getExactInverse(&inv)); in TEST()
1453 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::IEEEquad(), "0.5"))); in TEST()
1454 EXPECT_TRUE(APFloat(APFloat::PPCDoubleDouble(), "2.0").getExactInverse(&inv)); in TEST()
1455 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::PPCDoubleDouble(), "0.5"))); in TEST()
1456 EXPECT_TRUE(APFloat(APFloat::x87DoubleExtended(), "2.0").getExactInverse(&inv)); in TEST()
1457 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(APFloat::x87DoubleExtended(), "0.5"))); in TEST()
1460 EXPECT_TRUE(APFloat(1.17549435e-38f).getExactInverse(&inv)); in TEST()
1461 EXPECT_TRUE(inv.bitwiseIsEqual(APFloat(8.5070592e+37f))); in TEST()
1464 EXPECT_FALSE(APFloat(1.7014118e38f).getExactInverse(nullptr)); in TEST()
1466 EXPECT_FALSE(APFloat(0.0).getExactInverse(nullptr)); in TEST()
1468 EXPECT_FALSE(APFloat(1.40129846e-45f).getExactInverse(nullptr)); in TEST()
1472 APFloat T(-0.5), S(3.14), R(APFloat::getLargest(APFloat::IEEEdouble())), P(0.0); in TEST()
1475 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1478 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1481 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1484 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1488 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1491 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1494 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1497 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1501 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1504 P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1507 P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1510 P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1513 P = APFloat::getZero(APFloat::IEEEdouble()); in TEST()
1514 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1516 P = APFloat::getZero(APFloat::IEEEdouble(), true); in TEST()
1517 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1519 P = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
1520 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1522 P = APFloat::getInf(APFloat::IEEEdouble()); in TEST()
1523 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1525 P = APFloat::getInf(APFloat::IEEEdouble(), true); in TEST()
1526 P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1529 APFloat::opStatus St; in TEST()
1531 P = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
1532 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1535 EXPECT_EQ(APFloat::opOK, St); in TEST()
1537 P = APFloat::getNaN(APFloat::IEEEdouble(), true); in TEST()
1538 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1541 EXPECT_EQ(APFloat::opOK, St); in TEST()
1543 P = APFloat::getSNaN(APFloat::IEEEdouble()); in TEST()
1544 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1548 EXPECT_EQ(APFloat::opInvalidOp, St); in TEST()
1550 P = APFloat::getSNaN(APFloat::IEEEdouble(), true); in TEST()
1551 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1555 EXPECT_EQ(APFloat::opInvalidOp, St); in TEST()
1557 P = APFloat::getInf(APFloat::IEEEdouble()); in TEST()
1558 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1561 EXPECT_EQ(APFloat::opOK, St); in TEST()
1563 P = APFloat::getInf(APFloat::IEEEdouble(), true); in TEST()
1564 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1567 EXPECT_EQ(APFloat::opOK, St); in TEST()
1569 P = APFloat::getZero(APFloat::IEEEdouble(), false); in TEST()
1570 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1573 EXPECT_EQ(APFloat::opOK, St); in TEST()
1575 P = APFloat::getZero(APFloat::IEEEdouble(), false); in TEST()
1576 St = P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1579 EXPECT_EQ(APFloat::opOK, St); in TEST()
1581 P = APFloat::getZero(APFloat::IEEEdouble(), true); in TEST()
1582 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1585 EXPECT_EQ(APFloat::opOK, St); in TEST()
1587 P = APFloat::getZero(APFloat::IEEEdouble(), true); in TEST()
1588 St = P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1591 EXPECT_EQ(APFloat::opOK, St); in TEST()
1593 P = APFloat(1E-100); in TEST()
1594 St = P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1597 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1599 P = APFloat(1E-100); in TEST()
1600 St = P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1603 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1605 P = APFloat(-1E-100); in TEST()
1606 St = P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1609 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1611 P = APFloat(-1E-100); in TEST()
1612 St = P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1615 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1617 P = APFloat(10.0); in TEST()
1618 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1620 EXPECT_EQ(APFloat::opOK, St); in TEST()
1622 P = APFloat(10.5); in TEST()
1623 St = P.roundToIntegral(APFloat::rmTowardZero); in TEST()
1625 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1627 P = APFloat(10.5); in TEST()
1628 St = P.roundToIntegral(APFloat::rmTowardPositive); in TEST()
1630 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1632 P = APFloat(10.5); in TEST()
1633 St = P.roundToIntegral(APFloat::rmTowardNegative); in TEST()
1635 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1637 P = APFloat(10.5); in TEST()
1638 St = P.roundToIntegral(APFloat::rmNearestTiesToAway); in TEST()
1640 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1642 P = APFloat(10.5); in TEST()
1643 St = P.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
1645 EXPECT_EQ(APFloat::opInexact, St); in TEST()
1649 APFloat T(-0.0); in TEST()
1651 T = APFloat(3.14159); in TEST()
1653 T = APFloat::getNaN(APFloat::IEEEdouble()); in TEST()
1655 T = APFloat::getInf(APFloat::IEEEdouble()); in TEST()
1657 T = APFloat::getInf(APFloat::IEEEdouble(), true); in TEST()
1659 T = APFloat::getLargest(APFloat::IEEEdouble()); in TEST()
1664 APFloat F1(-0.0); in TEST()
1665 APFloat F2(-0.0); in TEST()
1666 llvm::detail::DoubleAPFloat T(APFloat::PPCDoubleDouble(), std::move(F1), in TEST()
1669 APFloat F3(3.14159); in TEST()
1670 APFloat F4(-0.0); in TEST()
1671 llvm::detail::DoubleAPFloat T2(APFloat::PPCDoubleDouble(), std::move(F3), in TEST()
1674 APFloat F5(-0.0); in TEST()
1675 APFloat F6(3.14159); in TEST()
1676 llvm::detail::DoubleAPFloat T3(APFloat::PPCDoubleDouble(), std::move(F5), in TEST()
1682 EXPECT_EQ(3.402823466e+38f, APFloat::getLargest(APFloat::IEEEsingle()).convertToFloat()); in TEST()
1683 EXPECT_EQ(1.7976931348623158e+308, APFloat::getLargest(APFloat::IEEEdouble()).convertToDouble()); in TEST()
1687 APFloat test = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
1688 APFloat expected = APFloat(APFloat::IEEEsingle(), "0x0.000002p-126"); in TEST()
1694 test = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
1695 expected = APFloat(APFloat::IEEEsingle(), "-0x0.000002p-126"); in TEST()
1701 test = APFloat::getSmallest(APFloat::IEEEquad(), false); in TEST()
1702 expected = APFloat(APFloat::IEEEquad(), "0x0.0000000000000000000000000001p-16382"); in TEST()
1708 test = APFloat::getSmallest(APFloat::IEEEquad(), true); in TEST()
1709 expected = APFloat(APFloat::IEEEquad(), "-0x0.0000000000000000000000000001p-16382"); in TEST()
1717 APFloat test = APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
1718 APFloat expected = APFloat(APFloat::IEEEsingle(), "0x1p-126"); in TEST()
1724 test = APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
1725 expected = APFloat(APFloat::IEEEsingle(), "-0x1p-126"); in TEST()
1731 test = APFloat::getSmallestNormalized(APFloat::IEEEquad(), false); in TEST()
1732 expected = APFloat(APFloat::IEEEquad(), "0x1p-16382"); in TEST()
1738 test = APFloat::getSmallestNormalized(APFloat::IEEEquad(), true); in TEST()
1739 expected = APFloat(APFloat::IEEEquad(), "-0x1p-16382"); in TEST()
1753 { &APFloat::IEEEhalf(), false, {0, 0}, 1}, in TEST()
1754 { &APFloat::IEEEhalf(), true, {0x8000ULL, 0}, 1}, in TEST()
1755 { &APFloat::IEEEsingle(), false, {0, 0}, 1}, in TEST()
1756 { &APFloat::IEEEsingle(), true, {0x80000000ULL, 0}, 1}, in TEST()
1757 { &APFloat::IEEEdouble(), false, {0, 0}, 1}, in TEST()
1758 { &APFloat::IEEEdouble(), true, {0x8000000000000000ULL, 0}, 1}, in TEST()
1759 { &APFloat::IEEEquad(), false, {0, 0}, 2}, in TEST()
1760 { &APFloat::IEEEquad(), true, {0, 0x8000000000000000ULL}, 2}, in TEST()
1761 { &APFloat::PPCDoubleDouble(), false, {0, 0}, 2}, in TEST()
1762 { &APFloat::PPCDoubleDouble(), true, {0x8000000000000000ULL, 0}, 2}, in TEST()
1763 { &APFloat::x87DoubleExtended(), false, {0, 0}, 2}, in TEST()
1764 { &APFloat::x87DoubleExtended(), true, {0, 0x8000ULL}, 2}, in TEST()
1768 APFloat test = APFloat::getZero(*GetZeroTest[i].semantics, in TEST()
1771 APFloat expected = APFloat(*GetZeroTest[i].semantics, in TEST()
1784 EXPECT_TRUE(APFloat(-42.0).bitwiseIsEqual( in TEST()
1785 APFloat::copySign(APFloat(42.0), APFloat(-1.0)))); in TEST()
1786 EXPECT_TRUE(APFloat(42.0).bitwiseIsEqual( in TEST()
1787 APFloat::copySign(APFloat(-42.0), APFloat(1.0)))); in TEST()
1788 EXPECT_TRUE(APFloat(-42.0).bitwiseIsEqual( in TEST()
1789 APFloat::copySign(APFloat(-42.0), APFloat(-1.0)))); in TEST()
1790 EXPECT_TRUE(APFloat(42.0).bitwiseIsEqual( in TEST()
1791 APFloat::copySign(APFloat(42.0), APFloat(1.0)))); in TEST()
1796 APFloat test(APFloat::IEEEdouble(), "1.0"); in TEST()
1797 test.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1801 test = APFloat(APFloat::x87DoubleExtended(), "0x1p-53"); in TEST()
1802 test.add(APFloat(APFloat::x87DoubleExtended(), "1.0"), APFloat::rmNearestTiesToEven); in TEST()
1803 test.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1807 test = APFloat(APFloat::IEEEquad(), "0x1p-53"); in TEST()
1808 test.add(APFloat(APFloat::IEEEquad(), "1.0"), APFloat::rmNearestTiesToEven); in TEST()
1809 test.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1813 test = APFloat(APFloat::x87DoubleExtended(), "0xf.fffffffp+28"); in TEST()
1814 test.convert(APFloat::IEEEdouble(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1818 test = APFloat::getSNaN(APFloat::IEEEsingle()); in TEST()
1819 …APFloat::opStatus status = test.convert(APFloat::x87DoubleExtended(), APFloat::rmNearestTiesToEven… in TEST()
1822 …EXPECT_TRUE(test.bitwiseIsEqual(APFloat::getQNaN(APFloat::x87DoubleExtended(), false, &topTwoBits)… in TEST()
1824 EXPECT_EQ(status, APFloat::opInvalidOp); in TEST()
1826 test = APFloat::getQNaN(APFloat::IEEEsingle()); in TEST()
1827 APFloat X87QNaN = APFloat::getQNaN(APFloat::x87DoubleExtended()); in TEST()
1828 test.convert(APFloat::x87DoubleExtended(), APFloat::rmNearestTiesToEven, in TEST()
1833 test = APFloat::getSNaN(APFloat::x87DoubleExtended()); in TEST()
1834 test.convert(APFloat::x87DoubleExtended(), APFloat::rmNearestTiesToEven, in TEST()
1836 APFloat X87SNaN = APFloat::getSNaN(APFloat::x87DoubleExtended()); in TEST()
1840 test = APFloat::getQNaN(APFloat::x87DoubleExtended()); in TEST()
1841 test.convert(APFloat::x87DoubleExtended(), APFloat::rmNearestTiesToEven, in TEST()
1848 test = APFloat::getSNaN(APFloat::IEEEdouble(), false, &payload); in TEST()
1849 status = test.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1852 EXPECT_EQ(status, APFloat::opInvalidOp); in TEST()
1855 test = APFloat::getQNaN(APFloat::IEEEdouble(), false, &payload); in TEST()
1856 status = test.convert(APFloat::IEEEsingle(), APFloat::rmNearestTiesToEven, &losesInfo); in TEST()
1859 EXPECT_EQ(status, APFloat::opOK); in TEST()
1863 APFloat test(APFloat::PPCDoubleDouble(), "1.0"); in TEST()
1868 test = APFloat(APFloat::PPCDoubleDouble(), "1.79769313486231580793728971405301e+308"); in TEST()
1873 test = APFloat(APFloat::PPCDoubleDouble(), "2.00416836000897277799610805135016e-292"); in TEST()
1879 auto Result = APFloat(APFloat::PPCDoubleDouble(), "1.0") + in TEST()
1880 APFloat(APFloat::PPCDoubleDouble(), "1.0"); in TEST()
1881 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1883 Result = APFloat(APFloat::PPCDoubleDouble(), "1.0") - in TEST()
1884 APFloat(APFloat::PPCDoubleDouble(), "1.0"); in TEST()
1885 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1887 Result = APFloat(APFloat::PPCDoubleDouble(), "1.0") * in TEST()
1888 APFloat(APFloat::PPCDoubleDouble(), "1.0"); in TEST()
1889 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1891 Result = APFloat(APFloat::PPCDoubleDouble(), "1.0") / in TEST()
1892 APFloat(APFloat::PPCDoubleDouble(), "1.0"); in TEST()
1893 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1896 Result = frexp(APFloat(APFloat::PPCDoubleDouble(), "1.0"), Exp, in TEST()
1897 APFloat::rmNearestTiesToEven); in TEST()
1898 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1900 Result = scalbn(APFloat(APFloat::PPCDoubleDouble(), "1.0"), 1, in TEST()
1901 APFloat::rmNearestTiesToEven); in TEST()
1902 EXPECT_EQ(&APFloat::PPCDoubleDouble(), &Result.getSemantics()); in TEST()
1907 APFloat t(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
1909 t = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
1912 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), false).isNegative()); in TEST()
1913 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle(), true).isNegative()); in TEST()
1915 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), false).isNegative()); in TEST()
1916 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle(), true).isNegative()); in TEST()
1918 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), false).isNegative()); in TEST()
1919 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle(), true).isNegative()); in TEST()
1921 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isNegative()); in TEST()
1922 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), true).isNegative()); in TEST()
1926 APFloat t(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
1929 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), false).isNormal()); in TEST()
1930 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), false).isNormal()); in TEST()
1931 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), false).isNormal()); in TEST()
1932 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isNormal()); in TEST()
1933 EXPECT_FALSE(APFloat(APFloat::IEEEsingle(), "0x1p-149").isNormal()); in TEST()
1937 APFloat t(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
1939 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), false).isFinite()); in TEST()
1940 EXPECT_TRUE(APFloat::getZero(APFloat::IEEEsingle(), false).isFinite()); in TEST()
1941 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), false).isFinite()); in TEST()
1942 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isFinite()); in TEST()
1943 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "0x1p-149").isFinite()); in TEST()
1947 APFloat t(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
1949 EXPECT_TRUE(APFloat::getInf(APFloat::IEEEsingle(), false).isInfinity()); in TEST()
1950 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), false).isInfinity()); in TEST()
1951 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), false).isInfinity()); in TEST()
1952 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isInfinity()); in TEST()
1953 EXPECT_FALSE(APFloat(APFloat::IEEEsingle(), "0x1p-149").isInfinity()); in TEST()
1957 APFloat t(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
1959 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), false).isNaN()); in TEST()
1960 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), false).isNaN()); in TEST()
1961 EXPECT_TRUE(APFloat::getNaN(APFloat::IEEEsingle(), false).isNaN()); in TEST()
1962 EXPECT_TRUE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isNaN()); in TEST()
1963 EXPECT_FALSE(APFloat(APFloat::IEEEsingle(), "0x1p-149").isNaN()); in TEST()
1968 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "0x1p+0").isFiniteNonZero()); in TEST()
1969 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "-0x1p+0").isFiniteNonZero()); in TEST()
1972 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "0x1p-149").isFiniteNonZero()); in TEST()
1973 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "-0x1p-149").isFiniteNonZero()); in TEST()
1976 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), false).isFiniteNonZero()); in TEST()
1977 EXPECT_FALSE(APFloat::getInf(APFloat::IEEEsingle(), true).isFiniteNonZero()); in TEST()
1980 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), false).isFiniteNonZero()); in TEST()
1981 EXPECT_FALSE(APFloat::getZero(APFloat::IEEEsingle(), true).isFiniteNonZero()); in TEST()
1985 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), false).isFiniteNonZero()); in TEST()
1986 EXPECT_FALSE(APFloat::getNaN(APFloat::IEEEsingle(), true).isFiniteNonZero()); in TEST()
1990 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), false).isFiniteNonZero()); in TEST()
1991 EXPECT_FALSE(APFloat::getSNaN(APFloat::IEEEsingle(), true).isFiniteNonZero()); in TEST()
1997 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
1998 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
1999 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
2000 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
2001 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
2002 APFloat SNaN = APFloat(APFloat::IEEEsingle(), "snan123"); in TEST()
2003 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
2004 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
2005 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
2006 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
2007 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
2008 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
2009 APFloat PSmallestNormalized = in TEST()
2010 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
2011 APFloat MSmallestNormalized = in TEST()
2012 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
2014 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2017 APFloat x; in TEST()
2018 APFloat y; in TEST()
2023 { PInf, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2024 { PInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2025 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2026 { PInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2027 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2028 { PInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2029 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2030 { PInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2031 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2032 { PInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2033 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2034 { PInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2035 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2036 { PInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2037 { MInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2038 { MInf, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2039 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2040 { MInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2041 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2042 { MInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2043 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2044 { MInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2045 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2046 { MInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2047 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2048 { MInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2049 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2050 { MInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2051 { PZero, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2052 { PZero, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2053 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2054 { PZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2055 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2056 { PZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2057 { PZero, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2058 { PZero, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2059 { PZero, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2060 { PZero, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2061 { PZero, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2062 { PZero, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2063 { PZero, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2064 { PZero, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2065 { MZero, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2066 { MZero, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2067 { MZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2068 { MZero, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2069 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2070 { MZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2071 { MZero, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2072 { MZero, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2073 { MZero, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2074 { MZero, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2075 { MZero, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2076 { MZero, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2077 { MZero, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2078 { MZero, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2079 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2080 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2081 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2082 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2083 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2084 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2085 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2086 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2087 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2088 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2089 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2090 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2091 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2092 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2093 { SNaN, PInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2094 { SNaN, MInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2095 { SNaN, PZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2096 { SNaN, MZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2097 { SNaN, QNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2098 { SNaN, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2099 { SNaN, PNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2100 { SNaN, MNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2101 { SNaN, PLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2102 { SNaN, MLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2103 { SNaN, PSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2104 { SNaN, MSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2105 { SNaN, PSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2106 { SNaN, MSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2107 { PNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2108 { PNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2109 { PNormalValue, PZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2110 { PNormalValue, MZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2111 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2112 { PNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2113 { PNormalValue, PNormalValue, "0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2114 { PNormalValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2115 { PNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2116 { PNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2117 { PNormalValue, PSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2118 { PNormalValue, MSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2119 { PNormalValue, PSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2120 { PNormalValue, MSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2121 { MNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2122 { MNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2123 { MNormalValue, PZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2124 { MNormalValue, MZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2125 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2126 { MNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2127 { MNormalValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2128 { MNormalValue, MNormalValue, "-0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2129 { MNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2130 { MNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2131 { MNormalValue, PSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2132 { MNormalValue, MSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2133 { MNormalValue, PSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2134 { MNormalValue, MSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2135 { PLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2136 { PLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2137 { PLargestValue, PZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2138 { PLargestValue, MZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2139 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2140 { PLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2141 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2142 { PLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2143 { PLargestValue, PLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2144 { PLargestValue, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2145 { PLargestValue, PSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2146 { PLargestValue, MSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2147 … { PLargestValue, PSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2148 … { PLargestValue, MSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2149 { MLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2150 { MLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2151 { MLargestValue, PZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2152 { MLargestValue, MZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2153 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2154 { MLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2155 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2156 { MLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2157 { MLargestValue, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2158 { MLargestValue, MLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2159 { MLargestValue, PSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2160 { MLargestValue, MSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2161 … { MLargestValue, PSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2162 … { MLargestValue, MSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2163 { PSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2164 { PSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2165 { PSmallestValue, PZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2166 { PSmallestValue, MZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2167 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2168 { PSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2169 { PSmallestValue, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2170 { PSmallestValue, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2171 { PSmallestValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2172 { PSmallestValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2173 { PSmallestValue, PSmallestValue, "0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2174 { PSmallestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2175 { PSmallestValue, PSmallestNormalized, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2176 { PSmallestValue, MSmallestNormalized, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2177 { MSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2178 { MSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2179 { MSmallestValue, PZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2180 { MSmallestValue, MZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2181 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2182 { MSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2183 { MSmallestValue, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2184 { MSmallestValue, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2185 { MSmallestValue, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2186 { MSmallestValue, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2187 { MSmallestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2188 { MSmallestValue, MSmallestValue, "-0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2189 { MSmallestValue, PSmallestNormalized, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2190 { MSmallestValue, MSmallestNormalized, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2191 { PSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2192 { PSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2193 { PSmallestNormalized, PZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2194 { PSmallestNormalized, MZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2195 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2196 { PSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2197 { PSmallestNormalized, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2198 { PSmallestNormalized, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2199 … { PSmallestNormalized, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2200 … { PSmallestNormalized, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2201 { PSmallestNormalized, PSmallestValue, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2202 { PSmallestNormalized, MSmallestValue, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2203 { PSmallestNormalized, PSmallestNormalized, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
2204 { PSmallestNormalized, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2205 { MSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2206 { MSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2207 { MSmallestNormalized, PZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2208 { MSmallestNormalized, MZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2209 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2210 { MSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2211 { MSmallestNormalized, PNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2212 { MSmallestNormalized, MNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2213 … { MSmallestNormalized, PLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2214 … { MSmallestNormalized, MLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2215 { MSmallestNormalized, PSmallestValue, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2216 { MSmallestNormalized, MSmallestValue, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2217 { MSmallestNormalized, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2218 { MSmallestNormalized, MSmallestNormalized, "-0x1p-125", APFloat::opOK, APFloat::fcNormal } in TEST()
2222 APFloat x(SpecialCaseTests[i].x); in TEST()
2223 APFloat y(SpecialCaseTests[i].y); in TEST()
2224 APFloat::opStatus status = x.add(y, APFloat::rmNearestTiesToEven); in TEST()
2226 APFloat result(APFloat::IEEEsingle(), SpecialCaseTests[i].result); in TEST()
2237 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
2238 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
2239 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
2240 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
2241 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
2242 APFloat SNaN = APFloat(APFloat::IEEEsingle(), "snan123"); in TEST()
2243 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
2244 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
2245 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
2246 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
2247 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
2248 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
2249 APFloat PSmallestNormalized = in TEST()
2250 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
2251 APFloat MSmallestNormalized = in TEST()
2252 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
2254 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2257 APFloat x; in TEST()
2258 APFloat y; in TEST()
2263 { PInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2264 { PInf, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2265 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2266 { PInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2267 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2268 { PInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2269 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2270 { PInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2271 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2272 { PInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2273 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2274 { PInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2275 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2276 { PInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2277 { MInf, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2278 { MInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2279 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2280 { MInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2281 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2282 { MInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2283 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2284 { MInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2285 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2286 { MInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2287 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2288 { MInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2289 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2290 { MInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2291 { PZero, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2292 { PZero, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2293 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2294 { PZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2295 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2296 { PZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2297 { PZero, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2298 { PZero, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2299 { PZero, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2300 { PZero, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2301 { PZero, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2302 { PZero, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2303 { PZero, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2304 { PZero, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2305 { MZero, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2306 { MZero, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2307 { MZero, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2308 { MZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2309 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2310 { MZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2311 { MZero, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2312 { MZero, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2313 { MZero, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2314 { MZero, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2315 { MZero, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2316 { MZero, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2317 { MZero, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2318 { MZero, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2319 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2320 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2321 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2322 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2323 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2324 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2325 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2326 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2327 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2328 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2329 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2330 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2331 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2332 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2333 { SNaN, PInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2334 { SNaN, MInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2335 { SNaN, PZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2336 { SNaN, MZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2337 { SNaN, QNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2338 { SNaN, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2339 { SNaN, PNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2340 { SNaN, MNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2341 { SNaN, PLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2342 { SNaN, MLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2343 { SNaN, PSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2344 { SNaN, MSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2345 { SNaN, PSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2346 { SNaN, MSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2347 { PNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2348 { PNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2349 { PNormalValue, PZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2350 { PNormalValue, MZero, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2351 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2352 { PNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2353 { PNormalValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2354 { PNormalValue, MNormalValue, "0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2355 { PNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2356 { PNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2357 { PNormalValue, PSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2358 { PNormalValue, MSmallestValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2359 { PNormalValue, PSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2360 { PNormalValue, MSmallestNormalized, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2361 { MNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2362 { MNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2363 { MNormalValue, PZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2364 { MNormalValue, MZero, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2365 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2366 { MNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2367 { MNormalValue, PNormalValue, "-0x1p+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2368 { MNormalValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2369 { MNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2370 { MNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2371 { MNormalValue, PSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2372 { MNormalValue, MSmallestValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2373 { MNormalValue, PSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2374 { MNormalValue, MSmallestNormalized, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2375 { PLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2376 { PLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2377 { PLargestValue, PZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2378 { PLargestValue, MZero, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2379 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2380 { PLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2381 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2382 { PLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2383 { PLargestValue, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2384 { PLargestValue, MLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2385 { PLargestValue, PSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2386 { PLargestValue, MSmallestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2387 … { PLargestValue, PSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2388 … { PLargestValue, MSmallestNormalized, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2389 { MLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2390 { MLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2391 { MLargestValue, PZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2392 { MLargestValue, MZero, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2393 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2394 { MLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2395 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2396 { MLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2397 { MLargestValue, PLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2398 { MLargestValue, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2399 { MLargestValue, PSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2400 { MLargestValue, MSmallestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2401 … { MLargestValue, PSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2402 … { MLargestValue, MSmallestNormalized, "-0x1.fffffep+127", APFloat::opInexact, 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, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2406 { PSmallestValue, MZero, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2407 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2408 { PSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2409 { PSmallestValue, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2410 { PSmallestValue, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2411 { PSmallestValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2412 { PSmallestValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2413 { PSmallestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2414 { PSmallestValue, MSmallestValue, "0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2415 { PSmallestValue, PSmallestNormalized, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2416 { PSmallestValue, MSmallestNormalized, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2417 { MSmallestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2418 { MSmallestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2419 { MSmallestValue, PZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2420 { MSmallestValue, MZero, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2421 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2422 { MSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2423 { MSmallestValue, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2424 { MSmallestValue, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2425 { MSmallestValue, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2426 { MSmallestValue, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2427 { MSmallestValue, PSmallestValue, "-0x1p-148", APFloat::opOK, APFloat::fcNormal }, in TEST()
2428 { MSmallestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2429 { MSmallestValue, PSmallestNormalized, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2430 { MSmallestValue, MSmallestNormalized, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2431 { PSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2432 { PSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2433 { PSmallestNormalized, PZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2434 { PSmallestNormalized, MZero, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2435 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2436 { PSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2437 { PSmallestNormalized, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2438 { PSmallestNormalized, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2439 … { PSmallestNormalized, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2440 … { PSmallestNormalized, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2441 { PSmallestNormalized, PSmallestValue, "0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2442 { PSmallestNormalized, MSmallestValue, "0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2443 { PSmallestNormalized, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2444 { PSmallestNormalized, MSmallestNormalized, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
2445 { MSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2446 { MSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2447 { MSmallestNormalized, PZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2448 { MSmallestNormalized, MZero, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2449 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2450 { MSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2451 { MSmallestNormalized, PNormalValue, "-0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2452 { MSmallestNormalized, MNormalValue, "0x1p+0", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2453 … { MSmallestNormalized, PLargestValue, "-0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2454 … { MSmallestNormalized, MLargestValue, "0x1.fffffep+127", APFloat::opInexact, APFloat::fcNormal }, in TEST()
2455 { MSmallestNormalized, PSmallestValue, "-0x1.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2456 { MSmallestNormalized, MSmallestValue, "-0x1.fffffcp-127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2457 { MSmallestNormalized, PSmallestNormalized, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
2458 { MSmallestNormalized, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero } in TEST()
2462 APFloat x(SpecialCaseTests[i].x); in TEST()
2463 APFloat y(SpecialCaseTests[i].y); in TEST()
2464 APFloat::opStatus status = x.subtract(y, APFloat::rmNearestTiesToEven); in TEST()
2466 APFloat result(APFloat::IEEEsingle(), SpecialCaseTests[i].result); in TEST()
2477 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
2478 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
2479 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
2480 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
2481 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
2482 APFloat SNaN = APFloat(APFloat::IEEEsingle(), "snan123"); in TEST()
2483 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
2484 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
2485 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
2486 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
2487 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
2488 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
2489 APFloat PSmallestNormalized = in TEST()
2490 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
2491 APFloat MSmallestNormalized = in TEST()
2492 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
2494 APFloat MaxQuad(APFloat::IEEEquad(), in TEST()
2496 APFloat MinQuad(APFloat::IEEEquad(), in TEST()
2498 APFloat NMinQuad(APFloat::IEEEquad(), in TEST()
2501 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2502 const int UnderflowStatus = APFloat::opUnderflow | APFloat::opInexact; in TEST()
2505 APFloat x; in TEST()
2506 APFloat y; in TEST()
2510 APFloat::roundingMode roundingMode = APFloat::rmNearestTiesToEven; in TEST()
2512 { PInf, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2513 { PInf, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2514 { PInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2515 { PInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2516 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2517 { PInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2518 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2519 { PInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2520 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2521 { PInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2522 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2523 { PInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2524 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2525 { PInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2526 { MInf, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2527 { MInf, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2528 { MInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2529 { MInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2530 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2531 { MInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2532 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2533 { MInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2534 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2535 { MInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2536 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2537 { MInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2538 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2539 { MInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2540 { PZero, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2541 { PZero, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2542 { PZero, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2543 { PZero, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2544 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2545 { PZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2546 { PZero, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2547 { PZero, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2548 { PZero, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2549 { PZero, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2550 { PZero, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2551 { PZero, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2552 { PZero, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2553 { PZero, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2554 { MZero, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2555 { MZero, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2556 { MZero, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2557 { MZero, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2558 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2559 { MZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2560 { MZero, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2561 { MZero, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2562 { MZero, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2563 { MZero, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2564 { MZero, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2565 { MZero, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2566 { MZero, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2567 { MZero, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2568 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2569 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2570 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2571 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2572 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2573 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2574 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2575 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2576 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2577 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2578 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2579 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2580 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2581 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2582 { SNaN, PInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2583 { SNaN, MInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2584 { SNaN, PZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2585 { SNaN, MZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2586 { SNaN, QNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2587 { SNaN, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2588 { SNaN, PNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2589 { SNaN, MNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2590 { SNaN, PLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2591 { SNaN, MLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2592 { SNaN, PSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2593 { SNaN, MSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2594 { SNaN, PSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2595 { SNaN, MSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2596 { PNormalValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2597 { PNormalValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2598 { PNormalValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2599 { PNormalValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2600 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2601 { PNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2602 { PNormalValue, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2603 { PNormalValue, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2604 { PNormalValue, PLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2605 { PNormalValue, MLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2606 { PNormalValue, PSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2607 { PNormalValue, MSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2608 { PNormalValue, PSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2609 { PNormalValue, MSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2610 { MNormalValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2611 { MNormalValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2612 { MNormalValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2613 { MNormalValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2614 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2615 { MNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2616 { MNormalValue, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2617 { MNormalValue, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2618 { MNormalValue, PLargestValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2619 { MNormalValue, MLargestValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2620 { MNormalValue, PSmallestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2621 { MNormalValue, MSmallestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2622 { MNormalValue, PSmallestNormalized, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2623 { MNormalValue, MSmallestNormalized, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2624 { PLargestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2625 { PLargestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2626 { PLargestValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2627 { PLargestValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2628 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2629 { PLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2630 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2631 { PLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2632 { PLargestValue, PLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2633 { PLargestValue, MLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2634 { PLargestValue, PSmallestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2635 { PLargestValue, MSmallestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2636 { PLargestValue, PSmallestNormalized, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2637 { PLargestValue, MSmallestNormalized, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2638 { MLargestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2639 { MLargestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2640 { MLargestValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2641 { MLargestValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2642 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2643 { MLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2644 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2645 { MLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2646 { MLargestValue, PLargestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2647 { MLargestValue, MLargestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2648 { MLargestValue, PSmallestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2649 { MLargestValue, MSmallestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2650 { MLargestValue, PSmallestNormalized, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2651 { MLargestValue, MSmallestNormalized, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2652 { PSmallestValue, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2653 { PSmallestValue, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2654 { PSmallestValue, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2655 { PSmallestValue, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2656 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2657 { PSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2658 { PSmallestValue, PNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2659 { PSmallestValue, MNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2660 { PSmallestValue, PLargestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2661 { PSmallestValue, MLargestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2662 { PSmallestValue, PSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2663 { PSmallestValue, MSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2664 { PSmallestValue, PSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2665 { PSmallestValue, MSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2666 { MSmallestValue, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2667 { MSmallestValue, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2668 { MSmallestValue, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2669 { MSmallestValue, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2670 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2671 { MSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2672 { MSmallestValue, PNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2673 { MSmallestValue, MNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2674 { MSmallestValue, PLargestValue, "-0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2675 { MSmallestValue, MLargestValue, "0x1.fffffep-22", APFloat::opOK, APFloat::fcNormal }, in TEST()
2676 { MSmallestValue, PSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2677 { MSmallestValue, MSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2678 { MSmallestValue, PSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2679 { MSmallestValue, MSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2680 { PSmallestNormalized, PInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2681 { PSmallestNormalized, MInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2682 { PSmallestNormalized, PZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2683 { PSmallestNormalized, MZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2684 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2685 { PSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2686 { PSmallestNormalized, PNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2687 { PSmallestNormalized, MNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2688 { PSmallestNormalized, PLargestValue, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2689 { PSmallestNormalized, MLargestValue, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2690 { PSmallestNormalized, PSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2691 { PSmallestNormalized, MSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2692 { PSmallestNormalized, PSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2693 { PSmallestNormalized, MSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2694 { MSmallestNormalized, PInf, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2695 { MSmallestNormalized, MInf, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2696 { MSmallestNormalized, PZero, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2697 { MSmallestNormalized, MZero, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2698 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2699 { MSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2700 { MSmallestNormalized, PNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2701 { MSmallestNormalized, MNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2702 { MSmallestNormalized, PLargestValue, "-0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2703 { MSmallestNormalized, MLargestValue, "0x1.fffffep+1", APFloat::opOK, APFloat::fcNormal }, in TEST()
2704 { MSmallestNormalized, PSmallestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2705 { MSmallestNormalized, MSmallestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2706 { MSmallestNormalized, PSmallestNormalized, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2707 { MSmallestNormalized, MSmallestNormalized, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2709 {MaxQuad, MinQuad, "0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2710 APFloat::fcNormal, APFloat::rmNearestTiesToEven}, in TEST()
2711 {MaxQuad, MinQuad, "0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2712 APFloat::fcNormal, APFloat::rmTowardPositive}, in TEST()
2713 {MaxQuad, MinQuad, "0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2714 APFloat::fcNormal, APFloat::rmTowardNegative}, in TEST()
2715 {MaxQuad, MinQuad, "0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2716 APFloat::fcNormal, APFloat::rmTowardZero}, in TEST()
2717 {MaxQuad, MinQuad, "0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2718 APFloat::fcNormal, APFloat::rmNearestTiesToAway}, in TEST()
2720 {MaxQuad, NMinQuad, "-0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2721 APFloat::fcNormal, APFloat::rmNearestTiesToEven}, in TEST()
2722 {MaxQuad, NMinQuad, "-0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2723 APFloat::fcNormal, APFloat::rmTowardPositive}, in TEST()
2724 {MaxQuad, NMinQuad, "-0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2725 APFloat::fcNormal, APFloat::rmTowardNegative}, in TEST()
2726 {MaxQuad, NMinQuad, "-0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2727 APFloat::fcNormal, APFloat::rmTowardZero}, in TEST()
2728 {MaxQuad, NMinQuad, "-0x1.ffffffffffffffffffffffffffffp-111", APFloat::opOK, in TEST()
2729 APFloat::fcNormal, APFloat::rmNearestTiesToAway}, in TEST()
2731 {MaxQuad, MaxQuad, "inf", OverflowStatus, APFloat::fcInfinity, in TEST()
2732 APFloat::rmNearestTiesToEven}, in TEST()
2733 {MaxQuad, MaxQuad, "inf", OverflowStatus, APFloat::fcInfinity, in TEST()
2734 APFloat::rmTowardPositive}, in TEST()
2736 APFloat::opInexact, APFloat::fcNormal, APFloat::rmTowardNegative}, in TEST()
2738 APFloat::opInexact, APFloat::fcNormal, APFloat::rmTowardZero}, in TEST()
2739 {MaxQuad, MaxQuad, "inf", OverflowStatus, APFloat::fcInfinity, in TEST()
2740 APFloat::rmNearestTiesToAway}, in TEST()
2742 {MinQuad, MinQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
2743 APFloat::rmNearestTiesToEven}, in TEST()
2745 UnderflowStatus, APFloat::fcNormal, APFloat::rmTowardPositive}, in TEST()
2746 {MinQuad, MinQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
2747 APFloat::rmTowardNegative}, in TEST()
2748 {MinQuad, MinQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
2749 APFloat::rmTowardZero}, in TEST()
2750 {MinQuad, MinQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
2751 APFloat::rmNearestTiesToAway}, in TEST()
2753 {MinQuad, NMinQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
2754 APFloat::rmNearestTiesToEven}, in TEST()
2755 {MinQuad, NMinQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
2756 APFloat::rmTowardPositive}, in TEST()
2758 UnderflowStatus, APFloat::fcNormal, APFloat::rmTowardNegative}, in TEST()
2759 {MinQuad, NMinQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
2760 APFloat::rmTowardZero}, in TEST()
2761 {MinQuad, NMinQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
2762 APFloat::rmNearestTiesToAway}, in TEST()
2766 APFloat x(SpecialCaseTests[i].x); in TEST()
2767 APFloat y(SpecialCaseTests[i].y); in TEST()
2768 APFloat::opStatus status = x.multiply(y, SpecialCaseTests[i].roundingMode); in TEST()
2770 APFloat result(x.getSemantics(), SpecialCaseTests[i].result); in TEST()
2781 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
2782 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
2783 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
2784 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
2785 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
2786 APFloat SNaN = APFloat(APFloat::IEEEsingle(), "snan123"); in TEST()
2787 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
2788 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
2789 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
2790 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
2791 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
2792 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
2793 APFloat PSmallestNormalized = in TEST()
2794 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
2795 APFloat MSmallestNormalized = in TEST()
2796 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
2798 APFloat MaxQuad(APFloat::IEEEquad(), in TEST()
2800 APFloat MinQuad(APFloat::IEEEquad(), in TEST()
2802 APFloat NMinQuad(APFloat::IEEEquad(), in TEST()
2805 const int OverflowStatus = APFloat::opOverflow | APFloat::opInexact; in TEST()
2806 const int UnderflowStatus = APFloat::opUnderflow | APFloat::opInexact; in TEST()
2809 APFloat x; in TEST()
2810 APFloat y; in TEST()
2814 APFloat::roundingMode roundingMode = APFloat::rmNearestTiesToEven; in TEST()
2816 { PInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2817 { PInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2818 { PInf, PZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2819 { PInf, MZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2820 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2821 { PInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2822 { PInf, PNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2823 { PInf, MNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2824 { PInf, PLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2825 { PInf, MLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2826 { PInf, PSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2827 { PInf, MSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2828 { PInf, PSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2829 { PInf, MSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2830 { MInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2831 { MInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2832 { MInf, PZero, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2833 { MInf, MZero, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2834 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2835 { MInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2836 { MInf, PNormalValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2837 { MInf, MNormalValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2838 { MInf, PLargestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2839 { MInf, MLargestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2840 { MInf, PSmallestValue, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2841 { MInf, MSmallestValue, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2842 { MInf, PSmallestNormalized, "-inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2843 { MInf, MSmallestNormalized, "inf", APFloat::opOK, APFloat::fcInfinity }, in TEST()
2844 { PZero, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2845 { PZero, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2846 { PZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2847 { PZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2848 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2849 { PZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2850 { PZero, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2851 { PZero, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2852 { PZero, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2853 { PZero, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2854 { PZero, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2855 { PZero, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2856 { PZero, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2857 { PZero, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2858 { MZero, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2859 { MZero, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2860 { MZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2861 { MZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2862 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2863 { MZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2864 { MZero, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2865 { MZero, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2866 { MZero, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2867 { MZero, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2868 { MZero, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2869 { MZero, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2870 { MZero, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2871 { MZero, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2872 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2873 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2874 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2875 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2876 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2877 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2878 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2879 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2880 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2881 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2882 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2883 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2884 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2885 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2886 { SNaN, PInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2887 { SNaN, MInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2888 { SNaN, PZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2889 { SNaN, MZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2890 { SNaN, QNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2891 { SNaN, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2892 { SNaN, PNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2893 { SNaN, MNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2894 { SNaN, PLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2895 { SNaN, MLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2896 { SNaN, PSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2897 { SNaN, MSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2898 { SNaN, PSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2899 { SNaN, MSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2900 { PNormalValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2901 { PNormalValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2902 { PNormalValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2903 { PNormalValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2904 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2905 { PNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2906 { PNormalValue, PNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2907 { PNormalValue, MNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2908 { PNormalValue, PLargestValue, "0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2909 { PNormalValue, MLargestValue, "-0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2910 { PNormalValue, PSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2911 { PNormalValue, MSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2912 { PNormalValue, PSmallestNormalized, "0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2913 { PNormalValue, MSmallestNormalized, "-0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2914 { MNormalValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2915 { MNormalValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2916 { MNormalValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2917 { MNormalValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2918 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2919 { MNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2920 { MNormalValue, PNormalValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2921 { MNormalValue, MNormalValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2922 { MNormalValue, PLargestValue, "-0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2923 { MNormalValue, MLargestValue, "0x1p-128", UnderflowStatus, APFloat::fcNormal }, in TEST()
2924 { MNormalValue, PSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2925 { MNormalValue, MSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2926 { MNormalValue, PSmallestNormalized, "-0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2927 { MNormalValue, MSmallestNormalized, "0x1p+126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2928 { PLargestValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2929 { PLargestValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2930 { PLargestValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2931 { PLargestValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2932 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2933 { PLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2934 { PLargestValue, PNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2935 { PLargestValue, MNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2936 { PLargestValue, PLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2937 { PLargestValue, MLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2938 { PLargestValue, PSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2939 { PLargestValue, MSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2940 { PLargestValue, PSmallestNormalized, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2941 { PLargestValue, MSmallestNormalized, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2942 { MLargestValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2943 { MLargestValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2944 { MLargestValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2945 { MLargestValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2946 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2947 { MLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2948 { MLargestValue, PNormalValue, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2949 { MLargestValue, MNormalValue, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
2950 { MLargestValue, PLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2951 { MLargestValue, MLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2952 { MLargestValue, PSmallestValue, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2953 { MLargestValue, MSmallestValue, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2954 { MLargestValue, PSmallestNormalized, "-inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2955 { MLargestValue, MSmallestNormalized, "inf", OverflowStatus, APFloat::fcInfinity }, in TEST()
2956 { PSmallestValue, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2957 { PSmallestValue, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2958 { PSmallestValue, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2959 { PSmallestValue, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2960 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2961 { PSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2962 { PSmallestValue, PNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2963 { PSmallestValue, MNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2964 { PSmallestValue, PLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2965 { PSmallestValue, MLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2966 { PSmallestValue, PSmallestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2967 { PSmallestValue, MSmallestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2968 { PSmallestValue, PSmallestNormalized, "0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2969 { PSmallestValue, MSmallestNormalized, "-0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2970 { MSmallestValue, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2971 { MSmallestValue, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2972 { MSmallestValue, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2973 { MSmallestValue, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2974 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2975 { MSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2976 { MSmallestValue, PNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2977 { MSmallestValue, MNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
2978 { MSmallestValue, PLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2979 { MSmallestValue, MLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2980 { MSmallestValue, PSmallestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2981 { MSmallestValue, MSmallestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2982 { MSmallestValue, PSmallestNormalized, "-0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2983 { MSmallestValue, MSmallestNormalized, "0x1p-23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2984 { PSmallestNormalized, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2985 { PSmallestNormalized, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2986 { PSmallestNormalized, PZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2987 { PSmallestNormalized, MZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
2988 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
2989 { PSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
2990 { PSmallestNormalized, PNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2991 { PSmallestNormalized, MNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
2992 { PSmallestNormalized, PLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2993 { PSmallestNormalized, MLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
2994 { PSmallestNormalized, PSmallestValue, "0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2995 { PSmallestNormalized, MSmallestValue, "-0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
2996 { PSmallestNormalized, PSmallestNormalized, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2997 { PSmallestNormalized, MSmallestNormalized, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
2998 { MSmallestNormalized, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
2999 { MSmallestNormalized, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3000 { MSmallestNormalized, PZero, "-inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
3001 { MSmallestNormalized, MZero, "inf", APFloat::opDivByZero, APFloat::fcInfinity }, in TEST()
3002 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3003 { MSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3004 { MSmallestNormalized, PNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3005 { MSmallestNormalized, MNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3006 { MSmallestNormalized, PLargestValue, "-0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
3007 { MSmallestNormalized, MLargestValue, "0x0p+0", UnderflowStatus, APFloat::fcZero }, in TEST()
3008 { MSmallestNormalized, PSmallestValue, "-0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
3009 { MSmallestNormalized, MSmallestValue, "0x1p+23", APFloat::opOK, APFloat::fcNormal }, in TEST()
3010 { MSmallestNormalized, PSmallestNormalized, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3011 { MSmallestNormalized, MSmallestNormalized, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3013 {MaxQuad, NMinQuad, "-inf", OverflowStatus, APFloat::fcInfinity, in TEST()
3014 APFloat::rmNearestTiesToEven}, in TEST()
3016 APFloat::opInexact, APFloat::fcNormal, APFloat::rmTowardPositive}, in TEST()
3017 {MaxQuad, NMinQuad, "-inf", OverflowStatus, APFloat::fcInfinity, in TEST()
3018 APFloat::rmTowardNegative}, in TEST()
3020 APFloat::opInexact, APFloat::fcNormal, APFloat::rmTowardZero}, in TEST()
3021 {MaxQuad, NMinQuad, "-inf", OverflowStatus, APFloat::fcInfinity, in TEST()
3022 APFloat::rmNearestTiesToAway}, in TEST()
3024 {MinQuad, MaxQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
3025 APFloat::rmNearestTiesToEven}, in TEST()
3027 UnderflowStatus, APFloat::fcNormal, APFloat::rmTowardPositive}, in TEST()
3028 {MinQuad, MaxQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
3029 APFloat::rmTowardNegative}, in TEST()
3030 {MinQuad, MaxQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
3031 APFloat::rmTowardZero}, in TEST()
3032 {MinQuad, MaxQuad, "0", UnderflowStatus, APFloat::fcZero, in TEST()
3033 APFloat::rmNearestTiesToAway}, in TEST()
3035 {NMinQuad, MaxQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
3036 APFloat::rmNearestTiesToEven}, in TEST()
3037 {NMinQuad, MaxQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
3038 APFloat::rmTowardPositive}, in TEST()
3040 UnderflowStatus, APFloat::fcNormal, APFloat::rmTowardNegative}, in TEST()
3041 {NMinQuad, MaxQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
3042 APFloat::rmTowardZero}, in TEST()
3043 {NMinQuad, MaxQuad, "-0", UnderflowStatus, APFloat::fcZero, in TEST()
3044 APFloat::rmNearestTiesToAway}, in TEST()
3048 APFloat x(SpecialCaseTests[i].x); in TEST()
3049 APFloat y(SpecialCaseTests[i].y); in TEST()
3050 APFloat::opStatus status = x.divide(y, SpecialCaseTests[i].roundingMode); in TEST()
3052 APFloat result(x.getSemantics(), SpecialCaseTests[i].result); in TEST()
3062 APFloat One = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
3063 APFloat Two = APFloat(APFloat::IEEEsingle(), "0x2p+0"); in TEST()
3072 APFloat Vals[NumVals] = { in TEST()
3073 APFloat::getNaN(APFloat::IEEEsingle(), true), in TEST()
3074 APFloat::getInf(APFloat::IEEEsingle(), true), in TEST()
3075 APFloat::getLargest(APFloat::IEEEsingle(), true), in TEST()
3076 APFloat(APFloat::IEEEsingle(), "-0x1p+0"), in TEST()
3077 APFloat::getZero(APFloat::IEEEsingle(), true), in TEST()
3078 APFloat::getZero(APFloat::IEEEsingle(), false), in TEST()
3079 APFloat(APFloat::IEEEsingle(), "0x1p+0"), in TEST()
3080 APFloat::getLargest(APFloat::IEEEsingle(), false), in TEST()
3081 APFloat::getInf(APFloat::IEEEsingle(), false), in TEST()
3082 APFloat::getNaN(APFloat::IEEEsingle(), false), in TEST()
3084 using Relation = void (*)(const APFloat &, const APFloat &); in TEST()
3085 Relation LT = [](const APFloat &LHS, const APFloat &RHS) { in TEST()
3093 Relation EQ = [](const APFloat &LHS, const APFloat &RHS) { in TEST()
3101 Relation GT = [](const APFloat &LHS, const APFloat &RHS) { in TEST()
3109 Relation UN = [](const APFloat &LHS, const APFloat &RHS) { in TEST()
3136 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
3137 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
3138 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
3139 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
3140 APFloat PQNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
3141 APFloat MQNaN = APFloat::getNaN(APFloat::IEEEsingle(), true); in TEST()
3142 APFloat PSNaN = APFloat::getSNaN(APFloat::IEEEsingle(), false); in TEST()
3143 APFloat MSNaN = APFloat::getSNaN(APFloat::IEEEsingle(), true); in TEST()
3144 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
3145 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
3146 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
3147 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
3148 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
3149 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
3150 APFloat PSmallestNormalized = in TEST()
3151 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
3152 APFloat MSmallestNormalized = in TEST()
3153 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
3174 APFloat One = APFloat(APFloat::IEEEsingle(), "1.0"); in TEST()
3175 APFloat NegOne = APFloat(APFloat::IEEEsingle(), "-1.0"); in TEST()
3176 APFloat Zero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
3177 APFloat NegZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
3178 APFloat Inf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
3179 APFloat NegInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
3180 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
3181 APFloat NegQNaN = APFloat::getNaN(APFloat::IEEEsingle(), true); in TEST()
3207 EXPECT_EQ(-1074, ilogb(APFloat::getSmallest(APFloat::IEEEdouble(), false))); in TEST()
3208 EXPECT_EQ(-1074, ilogb(APFloat::getSmallest(APFloat::IEEEdouble(), true))); in TEST()
3209 EXPECT_EQ(-1023, ilogb(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1024"))); in TEST()
3210 EXPECT_EQ(-1023, ilogb(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1023"))); in TEST()
3211 EXPECT_EQ(-1023, ilogb(APFloat(APFloat::IEEEdouble(), "-0x1.ffffffffffffep-1023"))); in TEST()
3212 EXPECT_EQ(-51, ilogb(APFloat(APFloat::IEEEdouble(), "0x1p-51"))); in TEST()
3213 EXPECT_EQ(-1023, ilogb(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp-1023"))); in TEST()
3214 EXPECT_EQ(-2, ilogb(APFloat(APFloat::IEEEdouble(), "0x0.ffffp-1"))); in TEST()
3215 EXPECT_EQ(-1023, ilogb(APFloat(APFloat::IEEEdouble(), "0x1.fffep-1023"))); in TEST()
3216 EXPECT_EQ(1023, ilogb(APFloat::getLargest(APFloat::IEEEdouble(), false))); in TEST()
3217 EXPECT_EQ(1023, ilogb(APFloat::getLargest(APFloat::IEEEdouble(), true))); in TEST()
3220 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle(), "0x1p+0"))); in TEST()
3221 EXPECT_EQ(0, ilogb(APFloat(APFloat::IEEEsingle(), "-0x1p+0"))); in TEST()
3222 EXPECT_EQ(42, ilogb(APFloat(APFloat::IEEEsingle(), "0x1p+42"))); in TEST()
3223 EXPECT_EQ(-42, ilogb(APFloat(APFloat::IEEEsingle(), "0x1p-42"))); in TEST()
3225 EXPECT_EQ(APFloat::IEK_Inf, in TEST()
3226 ilogb(APFloat::getInf(APFloat::IEEEsingle(), false))); in TEST()
3227 EXPECT_EQ(APFloat::IEK_Inf, in TEST()
3228 ilogb(APFloat::getInf(APFloat::IEEEsingle(), true))); in TEST()
3229 EXPECT_EQ(APFloat::IEK_Zero, in TEST()
3230 ilogb(APFloat::getZero(APFloat::IEEEsingle(), false))); in TEST()
3231 EXPECT_EQ(APFloat::IEK_Zero, in TEST()
3232 ilogb(APFloat::getZero(APFloat::IEEEsingle(), true))); in TEST()
3233 EXPECT_EQ(APFloat::IEK_NaN, in TEST()
3234 ilogb(APFloat::getNaN(APFloat::IEEEsingle(), false))); in TEST()
3235 EXPECT_EQ(APFloat::IEK_NaN, in TEST()
3236 ilogb(APFloat::getSNaN(APFloat::IEEEsingle(), false))); in TEST()
3238 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle(), false))); in TEST()
3239 EXPECT_EQ(127, ilogb(APFloat::getLargest(APFloat::IEEEsingle(), true))); in TEST()
3241 EXPECT_EQ(-149, ilogb(APFloat::getSmallest(APFloat::IEEEsingle(), false))); in TEST()
3242 EXPECT_EQ(-149, ilogb(APFloat::getSmallest(APFloat::IEEEsingle(), true))); in TEST()
3244 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false))); in TEST()
3246 ilogb(APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true))); in TEST()
3251 const APFloat::roundingMode RM = APFloat::rmNearestTiesToEven; in TEST()
3253 APFloat(APFloat::IEEEsingle(), "0x1p+0") in TEST()
3254 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle(), "0x1p+0"), 0, RM))); in TEST()
3256 APFloat(APFloat::IEEEsingle(), "0x1p+42") in TEST()
3257 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle(), "0x1p+0"), 42, RM))); in TEST()
3259 APFloat(APFloat::IEEEsingle(), "0x1p-42") in TEST()
3260 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEsingle(), "0x1p+0"), -42, RM))); in TEST()
3262 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
3263 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
3264 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
3265 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
3266 APFloat QPNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
3267 APFloat QMNaN = APFloat::getNaN(APFloat::IEEEsingle(), true); in TEST()
3268 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEsingle(), false); in TEST()
3278 APFloat ScalbnSNaN = scalbn(SNaN, 1, RM); in TEST()
3287 APFloat SNaNWithPayload = APFloat::getSNaN(APFloat::IEEEdouble(), false, in TEST()
3289 APFloat QuietPayload = scalbn(SNaNWithPayload, 1, RM); in TEST()
3294 scalbn(APFloat(APFloat::IEEEsingle(), "0x1p+0"), 128, RM))); in TEST()
3296 scalbn(APFloat(APFloat::IEEEsingle(), "-0x1p+0"), 128, RM))); in TEST()
3298 scalbn(APFloat(APFloat::IEEEsingle(), "0x1p+127"), 1, RM))); in TEST()
3300 scalbn(APFloat(APFloat::IEEEsingle(), "0x1p-127"), -127, RM))); in TEST()
3302 scalbn(APFloat(APFloat::IEEEsingle(), "-0x1p-127"), -127, RM))); in TEST()
3303 EXPECT_TRUE(APFloat(APFloat::IEEEsingle(), "-0x1p-149").bitwiseIsEqual( in TEST()
3304 scalbn(APFloat(APFloat::IEEEsingle(), "-0x1p-127"), -22, RM))); in TEST()
3306 scalbn(APFloat(APFloat::IEEEsingle(), "0x1p-126"), -24, RM))); in TEST()
3309 APFloat SmallestF64 = APFloat::getSmallest(APFloat::IEEEdouble(), false); in TEST()
3310 APFloat NegSmallestF64 = APFloat::getSmallest(APFloat::IEEEdouble(), true); in TEST()
3312 APFloat LargestF64 = APFloat::getLargest(APFloat::IEEEdouble(), false); in TEST()
3313 APFloat NegLargestF64 = APFloat::getLargest(APFloat::IEEEdouble(), true); in TEST()
3315 APFloat SmallestNormalizedF64 in TEST()
3316 = APFloat::getSmallestNormalized(APFloat::IEEEdouble(), false); in TEST()
3317 APFloat NegSmallestNormalizedF64 in TEST()
3318 = APFloat::getSmallestNormalized(APFloat::IEEEdouble(), true); in TEST()
3320 APFloat LargestDenormalF64(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1023"); in TEST()
3321 APFloat NegLargestDenormalF64(APFloat::IEEEdouble(), "-0x1.ffffffffffffep-1023"); in TEST()
3325 scalbn(APFloat(APFloat::IEEEdouble(), "0x1p-1074"), 0, RM))); in TEST()
3327 scalbn(APFloat(APFloat::IEEEdouble(), "-0x1p-1074"), 0, RM))); in TEST()
3329 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p+1023") in TEST()
3335 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p+1022") in TEST()
3337 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p+1023") in TEST()
3351 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1022") in TEST()
3353 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1.ffffffffffffep-1021") in TEST()
3356 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep+1") in TEST()
3365 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-2") in TEST()
3367 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1") in TEST()
3369 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep+0") in TEST()
3371 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep+1023") in TEST()
3373 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p+974") in TEST()
3376 APFloat RandomDenormalF64(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp+51"); in TEST()
3377 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp-972") in TEST()
3379 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp-1") in TEST()
3381 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp-2") in TEST()
3383 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp+0") in TEST()
3391 APFloat(APFloat::IEEEdouble(), "-0x1p-1073") in TEST()
3395 APFloat(APFloat::IEEEdouble(), "-0x1p-1024") in TEST()
3399 APFloat(APFloat::IEEEdouble(), "0x1p-1073") in TEST()
3403 APFloat(APFloat::IEEEdouble(), "0x1p-1074") in TEST()
3405 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1p-1074") in TEST()
3412 APFloat(APFloat::IEEEdouble(), "0x1p+0") in TEST()
3413 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEdouble(), "0x1p+52"), -52, RM))); in TEST()
3416 APFloat(APFloat::IEEEdouble(), "0x1p-103") in TEST()
3417 .bitwiseIsEqual(scalbn(APFloat(APFloat::IEEEdouble(), "0x1p-51"), -52, RM))); in TEST()
3421 const APFloat::roundingMode RM = APFloat::rmNearestTiesToEven; in TEST()
3423 APFloat PZero = APFloat::getZero(APFloat::IEEEdouble(), false); in TEST()
3424 APFloat MZero = APFloat::getZero(APFloat::IEEEdouble(), true); in TEST()
3425 APFloat One(1.0); in TEST()
3426 APFloat MOne(-1.0); in TEST()
3427 APFloat Two(2.0); in TEST()
3428 APFloat MTwo(-2.0); in TEST()
3430 APFloat LargestDenormal(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1023"); in TEST()
3431 APFloat NegLargestDenormal(APFloat::IEEEdouble(), "-0x1.ffffffffffffep-1023"); in TEST()
3433 APFloat Smallest = APFloat::getSmallest(APFloat::IEEEdouble(), false); in TEST()
3434 APFloat NegSmallest = APFloat::getSmallest(APFloat::IEEEdouble(), true); in TEST()
3436 APFloat Largest = APFloat::getLargest(APFloat::IEEEdouble(), false); in TEST()
3437 APFloat NegLargest = APFloat::getLargest(APFloat::IEEEdouble(), true); in TEST()
3439 APFloat PInf = APFloat::getInf(APFloat::IEEEdouble(), false); in TEST()
3440 APFloat MInf = APFloat::getInf(APFloat::IEEEdouble(), true); in TEST()
3442 APFloat QPNaN = APFloat::getNaN(APFloat::IEEEdouble(), false); in TEST()
3443 APFloat QMNaN = APFloat::getNaN(APFloat::IEEEdouble(), true); in TEST()
3444 APFloat SNaN = APFloat::getSNaN(APFloat::IEEEdouble(), false); in TEST()
3452 APFloat SNaNWithPayload = APFloat::getSNaN(APFloat::IEEEdouble(), false, in TEST()
3455 APFloat SmallestNormalized in TEST()
3456 = APFloat::getSmallestNormalized(APFloat::IEEEdouble(), false); in TEST()
3457 APFloat NegSmallestNormalized in TEST()
3458 = APFloat::getSmallestNormalized(APFloat::IEEEdouble(), true); in TEST()
3461 APFloat Frac(APFloat::IEEEdouble()); in TEST()
3475 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p-1").bitwiseIsEqual(Frac)); in TEST()
3479 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1p-1").bitwiseIsEqual(Frac)); in TEST()
3483 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.ffffffffffffep-1").bitwiseIsEqual(Frac)); in TEST()
3487 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1.ffffffffffffep-1").bitwiseIsEqual(Frac)); in TEST()
3492 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p-1").bitwiseIsEqual(Frac)); in TEST()
3496 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1p-1").bitwiseIsEqual(Frac)); in TEST()
3501 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.fffffffffffffp-1").bitwiseIsEqual(Frac)); in TEST()
3505 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "-0x1.fffffffffffffp-1").bitwiseIsEqual(Frac)); in TEST()
3533 Frac = frexp(APFloat(APFloat::IEEEdouble(), "0x0.ffffp-1"), Exp, RM); in TEST()
3535 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.fffep-1").bitwiseIsEqual(Frac)); in TEST()
3537 Frac = frexp(APFloat(APFloat::IEEEdouble(), "0x1p-51"), Exp, RM); in TEST()
3539 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1p-1").bitwiseIsEqual(Frac)); in TEST()
3541 Frac = frexp(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp+51"), Exp, RM); in TEST()
3543 EXPECT_TRUE(APFloat(APFloat::IEEEdouble(), "0x1.c60f120d9f87cp-1").bitwiseIsEqual(Frac)); in TEST()
3548 APFloat f1(APFloat::IEEEdouble(), "1.5"); in TEST()
3549 APFloat f2(APFloat::IEEEdouble(), "1.0"); in TEST()
3550 APFloat expected(APFloat::IEEEdouble(), "0.5"); in TEST()
3551 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3555 APFloat f1(APFloat::IEEEdouble(), "0.5"); in TEST()
3556 APFloat f2(APFloat::IEEEdouble(), "1.0"); in TEST()
3557 APFloat expected(APFloat::IEEEdouble(), "0.5"); in TEST()
3558 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3562 APFloat f1(APFloat::IEEEdouble(), "0x1.3333333333333p-2"); // 0.3 in TEST()
3563 APFloat f2(APFloat::IEEEdouble(), "0x1.47ae147ae147bp-7"); // 0.01 in TEST()
3564 APFloat expected(APFloat::IEEEdouble(), in TEST()
3566 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3570 APFloat f1(APFloat::IEEEdouble(), "0x1p64"); // 1.8446744073709552e19 in TEST()
3571 APFloat f2(APFloat::IEEEdouble(), "1.5"); in TEST()
3572 APFloat expected(APFloat::IEEEdouble(), "1.0"); in TEST()
3573 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3577 APFloat f1(APFloat::IEEEdouble(), "0x1p1000"); in TEST()
3578 APFloat f2(APFloat::IEEEdouble(), "0x1p-1000"); in TEST()
3579 APFloat expected(APFloat::IEEEdouble(), "0.0"); in TEST()
3580 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3584 APFloat f1(APFloat::IEEEdouble(), "0.0"); in TEST()
3585 APFloat f2(APFloat::IEEEdouble(), "1.0"); in TEST()
3586 APFloat expected(APFloat::IEEEdouble(), "0.0"); in TEST()
3587 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3591 APFloat f1(APFloat::IEEEdouble(), "1.0"); in TEST()
3592 APFloat f2(APFloat::IEEEdouble(), "0.0"); in TEST()
3593 EXPECT_EQ(f1.mod(f2), APFloat::opInvalidOp); in TEST()
3597 APFloat f1(APFloat::IEEEdouble(), "0.0"); in TEST()
3598 APFloat f2(APFloat::IEEEdouble(), "0.0"); in TEST()
3599 EXPECT_EQ(f1.mod(f2), APFloat::opInvalidOp); in TEST()
3603 APFloat f1 = APFloat::getInf(APFloat::IEEEdouble(), false); in TEST()
3604 APFloat f2(APFloat::IEEEdouble(), "1.0"); in TEST()
3605 EXPECT_EQ(f1.mod(f2), APFloat::opInvalidOp); in TEST()
3609 APFloat f1(APFloat::IEEEdouble(), "-4.0"); in TEST()
3610 APFloat f2(APFloat::IEEEdouble(), "-2.0"); in TEST()
3611 APFloat expected(APFloat::IEEEdouble(), "-0.0"); in TEST()
3612 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3616 APFloat f1(APFloat::IEEEdouble(), "-4.0"); in TEST()
3617 APFloat f2(APFloat::IEEEdouble(), "2.0"); in TEST()
3618 APFloat expected(APFloat::IEEEdouble(), "-0.0"); in TEST()
3619 EXPECT_EQ(f1.mod(f2), APFloat::opOK); in TEST()
3627 APFloat PInf = APFloat::getInf(APFloat::IEEEsingle(), false); in TEST()
3628 APFloat MInf = APFloat::getInf(APFloat::IEEEsingle(), true); in TEST()
3629 APFloat PZero = APFloat::getZero(APFloat::IEEEsingle(), false); in TEST()
3630 APFloat MZero = APFloat::getZero(APFloat::IEEEsingle(), true); in TEST()
3631 APFloat QNaN = APFloat::getNaN(APFloat::IEEEsingle(), false); in TEST()
3632 APFloat SNaN = APFloat(APFloat::IEEEsingle(), "snan123"); in TEST()
3633 APFloat PNormalValue = APFloat(APFloat::IEEEsingle(), "0x1p+0"); in TEST()
3634 APFloat MNormalValue = APFloat(APFloat::IEEEsingle(), "-0x1p+0"); in TEST()
3635 APFloat PLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), false); in TEST()
3636 APFloat MLargestValue = APFloat::getLargest(APFloat::IEEEsingle(), true); in TEST()
3637 APFloat PSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), false); in TEST()
3638 APFloat MSmallestValue = APFloat::getSmallest(APFloat::IEEEsingle(), true); in TEST()
3639 APFloat PSmallestNormalized = in TEST()
3640 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), false); in TEST()
3641 APFloat MSmallestNormalized = in TEST()
3642 APFloat::getSmallestNormalized(APFloat::IEEEsingle(), true); in TEST()
3644 APFloat PVal1(APFloat::IEEEsingle(), "0x1.fffffep+126"); in TEST()
3645 APFloat MVal1(APFloat::IEEEsingle(), "-0x1.fffffep+126"); in TEST()
3646 APFloat PVal2(APFloat::IEEEsingle(), "0x1.fffffep-126"); in TEST()
3647 APFloat MVal2(APFloat::IEEEsingle(), "-0x1.fffffep-126"); in TEST()
3648 APFloat PVal3(APFloat::IEEEsingle(), "0x1p-125"); in TEST()
3649 APFloat MVal3(APFloat::IEEEsingle(), "-0x1p-125"); in TEST()
3650 APFloat PVal4(APFloat::IEEEsingle(), "0x1p+127"); in TEST()
3651 APFloat MVal4(APFloat::IEEEsingle(), "-0x1p+127"); in TEST()
3652 APFloat PVal5(APFloat::IEEEsingle(), "1.5"); in TEST()
3653 APFloat MVal5(APFloat::IEEEsingle(), "-1.5"); in TEST()
3654 APFloat PVal6(APFloat::IEEEsingle(), "1"); in TEST()
3655 APFloat MVal6(APFloat::IEEEsingle(), "-1"); in TEST()
3658 APFloat x; in TEST()
3659 APFloat y; in TEST()
3664 { PInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3665 { PInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3666 { PInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3667 { PInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3668 { PInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3669 { PInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3670 { PInf, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3671 { PInf, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3672 { PInf, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3673 { PInf, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3674 { PInf, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3675 { PInf, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3676 { PInf, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3677 { PInf, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3678 { MInf, PInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3679 { MInf, MInf, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3680 { MInf, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3681 { MInf, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3682 { MInf, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3683 { MInf, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3684 { MInf, PNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3685 { MInf, MNormalValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3686 { MInf, PLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3687 { MInf, MLargestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3688 { MInf, PSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3689 { MInf, MSmallestValue, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3690 { MInf, PSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3691 { MInf, MSmallestNormalized, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3692 { PZero, PInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3693 { PZero, MInf, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3694 { PZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3695 { PZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3696 { PZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3697 { PZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3698 { PZero, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3699 { PZero, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3700 { PZero, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3701 { PZero, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3702 { PZero, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3703 { PZero, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3704 { PZero, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3705 { PZero, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3706 { MZero, PInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3707 { MZero, MInf, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3708 { MZero, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3709 { MZero, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3710 { MZero, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3711 { MZero, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3712 { MZero, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3713 { MZero, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3714 { MZero, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3715 { MZero, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3716 { MZero, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3717 { MZero, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3718 { MZero, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3719 { MZero, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3720 { QNaN, PInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3721 { QNaN, MInf, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3722 { QNaN, PZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3723 { QNaN, MZero, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3724 { QNaN, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3725 { QNaN, SNaN, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3726 { QNaN, PNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3727 { QNaN, MNormalValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3728 { QNaN, PLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3729 { QNaN, MLargestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3730 { QNaN, PSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3731 { QNaN, MSmallestValue, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3732 { QNaN, PSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3733 { QNaN, MSmallestNormalized, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3734 { SNaN, PInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3735 { SNaN, MInf, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3736 { SNaN, PZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3737 { SNaN, MZero, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3738 { SNaN, QNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3739 { SNaN, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3740 { SNaN, PNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3741 { SNaN, MNormalValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3742 { SNaN, PLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3743 { SNaN, MLargestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3744 { SNaN, PSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3745 { SNaN, MSmallestValue, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3746 { SNaN, PSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3747 { SNaN, MSmallestNormalized, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3748 { PNormalValue, PInf, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3749 { PNormalValue, MInf, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3750 { PNormalValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3751 { PNormalValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3752 { PNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3753 { PNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3754 { PNormalValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3755 { PNormalValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3756 { PNormalValue, PLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3757 { PNormalValue, MLargestValue, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3758 { PNormalValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3759 { PNormalValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3760 { PNormalValue, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3761 { PNormalValue, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3762 { MNormalValue, PInf, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3763 { MNormalValue, MInf, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3764 { MNormalValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3765 { MNormalValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3766 { MNormalValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3767 { MNormalValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3768 { MNormalValue, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3769 { MNormalValue, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3770 { MNormalValue, PLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3771 { MNormalValue, MLargestValue, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3772 { MNormalValue, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3773 { MNormalValue, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3774 { MNormalValue, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3775 { MNormalValue, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3776 { PLargestValue, PInf, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
3777 { PLargestValue, MInf, "0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
3778 { PLargestValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3779 { PLargestValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3780 { PLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3781 { PLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3782 { PLargestValue, PNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3783 { PLargestValue, MNormalValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3784 { PLargestValue, PLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3785 { PLargestValue, MLargestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3786 { PLargestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3787 { PLargestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3788 { PLargestValue, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3789 { PLargestValue, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3790 { MLargestValue, PInf, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
3791 { MLargestValue, MInf, "-0x1.fffffep+127", APFloat::opOK, APFloat::fcNormal }, in TEST()
3792 { MLargestValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3793 { MLargestValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3794 { MLargestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3795 { MLargestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3796 { MLargestValue, PNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3797 { MLargestValue, MNormalValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3798 { MLargestValue, PLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3799 { MLargestValue, MLargestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3800 { MLargestValue, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3801 { MLargestValue, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3802 { MLargestValue, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3803 { MLargestValue, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3804 { PSmallestValue, PInf, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3805 { PSmallestValue, MInf, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3806 { PSmallestValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3807 { PSmallestValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3808 { PSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3809 { PSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3810 { PSmallestValue, PNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3811 { PSmallestValue, MNormalValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3812 { PSmallestValue, PLargestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3813 { PSmallestValue, MLargestValue, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3814 { PSmallestValue, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3815 { PSmallestValue, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3816 { PSmallestValue, PSmallestNormalized, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3817 { PSmallestValue, MSmallestNormalized, "0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3818 { MSmallestValue, PInf, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3819 { MSmallestValue, MInf, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3820 { MSmallestValue, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3821 { MSmallestValue, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3822 { MSmallestValue, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3823 { MSmallestValue, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3824 { MSmallestValue, PNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3825 { MSmallestValue, MNormalValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3826 { MSmallestValue, PLargestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3827 { MSmallestValue, MLargestValue, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3828 { MSmallestValue, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3829 { MSmallestValue, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3830 { MSmallestValue, PSmallestNormalized, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3831 { MSmallestValue, MSmallestNormalized, "-0x1p-149", APFloat::opOK, APFloat::fcNormal }, in TEST()
3832 { PSmallestNormalized, PInf, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3833 { PSmallestNormalized, MInf, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3834 { PSmallestNormalized, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3835 { PSmallestNormalized, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3836 { PSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3837 { PSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3838 { PSmallestNormalized, PNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3839 { PSmallestNormalized, MNormalValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3840 { PSmallestNormalized, PLargestValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3841 { PSmallestNormalized, MLargestValue, "0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3842 { PSmallestNormalized, PSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3843 { PSmallestNormalized, MSmallestValue, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3844 { PSmallestNormalized, PSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3845 { PSmallestNormalized, MSmallestNormalized, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3846 { MSmallestNormalized, PInf, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3847 { MSmallestNormalized, MInf, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3848 { MSmallestNormalized, PZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3849 { MSmallestNormalized, MZero, "nan", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3850 { MSmallestNormalized, QNaN, "nan", APFloat::opOK, APFloat::fcNaN }, in TEST()
3851 { MSmallestNormalized, SNaN, "nan123", APFloat::opInvalidOp, APFloat::fcNaN }, in TEST()
3852 { MSmallestNormalized, PNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3853 { MSmallestNormalized, MNormalValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3854 { MSmallestNormalized, PLargestValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3855 { MSmallestNormalized, MLargestValue, "-0x1p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3856 { MSmallestNormalized, PSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3857 { MSmallestNormalized, MSmallestValue, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3858 { MSmallestNormalized, PSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3859 { MSmallestNormalized, MSmallestNormalized, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3861 { PVal1, PVal1, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3862 { PVal1, MVal1, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3863 { PVal1, PVal2, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3864 { PVal1, MVal2, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3865 { PVal1, PVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3866 { PVal1, MVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3867 { PVal1, PVal4, "-0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3868 { PVal1, MVal4, "-0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3869 { PVal1, PVal5, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3870 { PVal1, MVal5, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3871 { PVal1, PVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3872 { PVal1, MVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3873 { MVal1, PVal1, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3874 { MVal1, MVal1, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3875 { MVal1, PVal2, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3876 { MVal1, MVal2, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3877 { MVal1, PVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3878 { MVal1, MVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3879 { MVal1, PVal4, "0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3880 { MVal1, MVal4, "0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3881 { MVal1, PVal5, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3882 { MVal1, MVal5, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3883 { MVal1, PVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3884 { MVal1, MVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3885 { PVal2, PVal1, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3886 { PVal2, MVal1, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3887 { PVal2, PVal2, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3888 { PVal2, MVal2, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3889 { PVal2, PVal3, "-0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3890 { PVal2, MVal3, "-0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3891 { PVal2, PVal4, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3892 { PVal2, MVal4, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3893 { PVal2, PVal5, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3894 { PVal2, MVal5, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3895 { PVal2, PVal6, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3896 { PVal2, MVal6, "0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3897 { MVal2, PVal1, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3898 { MVal2, MVal1, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3899 { MVal2, PVal2, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3900 { MVal2, MVal2, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3901 { MVal2, PVal3, "0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3902 { MVal2, MVal3, "0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3903 { MVal2, PVal4, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3904 { MVal2, MVal4, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3905 { MVal2, PVal5, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3906 { MVal2, MVal5, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3907 { MVal2, PVal6, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3908 { MVal2, MVal6, "-0x1.fffffep-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3909 { PVal3, PVal1, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3910 { PVal3, MVal1, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3911 { PVal3, PVal2, "0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3912 { PVal3, MVal2, "0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3913 { PVal3, PVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3914 { PVal3, MVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3915 { PVal3, PVal4, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3916 { PVal3, MVal4, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3917 { PVal3, PVal5, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3918 { PVal3, MVal5, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3919 { PVal3, PVal6, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3920 { PVal3, MVal6, "0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3921 { MVal3, PVal1, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3922 { MVal3, MVal1, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3923 { MVal3, PVal2, "-0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3924 { MVal3, MVal2, "-0x0.000002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3925 { MVal3, PVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3926 { MVal3, MVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3927 { MVal3, PVal4, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3928 { MVal3, MVal4, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3929 { MVal3, PVal5, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3930 { MVal3, MVal5, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3931 { MVal3, PVal6, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3932 { MVal3, MVal6, "-0x1p-125", APFloat::opOK, APFloat::fcNormal }, in TEST()
3933 { PVal4, PVal1, "0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3934 { PVal4, MVal1, "0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3935 { PVal4, PVal2, "0x0.002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3936 { PVal4, MVal2, "0x0.002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3937 { PVal4, PVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3938 { PVal4, MVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3939 { PVal4, PVal4, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3940 { PVal4, MVal4, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3941 { PVal4, PVal5, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3942 { PVal4, MVal5, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3943 { PVal4, PVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3944 { PVal4, MVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3945 { MVal4, PVal1, "-0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3946 { MVal4, MVal1, "-0x1p+103", APFloat::opOK, APFloat::fcNormal }, in TEST()
3947 { MVal4, PVal2, "-0x0.002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3948 { MVal4, MVal2, "-0x0.002p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3949 { MVal4, PVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3950 { MVal4, MVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3951 { MVal4, PVal4, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3952 { MVal4, MVal4, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3953 { MVal4, PVal5, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3954 { MVal4, MVal5, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3955 { MVal4, PVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3956 { MVal4, MVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3957 { PVal5, PVal1, "1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3958 { PVal5, MVal1, "1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3959 { PVal5, PVal2, "0x0.00006p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3960 { PVal5, MVal2, "0x0.00006p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3961 { PVal5, PVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3962 { PVal5, MVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3963 { PVal5, PVal4, "1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3964 { PVal5, MVal4, "1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3965 { PVal5, PVal5, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3966 { PVal5, MVal5, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3967 { PVal5, PVal6, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3968 { PVal5, MVal6, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3969 { MVal5, PVal1, "-1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3970 { MVal5, MVal1, "-1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3971 { MVal5, PVal2, "-0x0.00006p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3972 { MVal5, MVal2, "-0x0.00006p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3973 { MVal5, PVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3974 { MVal5, MVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3975 { MVal5, PVal4, "-1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3976 { MVal5, MVal4, "-1.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3977 { MVal5, PVal5, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3978 { MVal5, MVal5, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3979 { MVal5, PVal6, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3980 { MVal5, MVal6, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3981 { PVal6, PVal1, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3982 { PVal6, MVal1, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3983 { PVal6, PVal2, "0x0.00004p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3984 { PVal6, MVal2, "0x0.00004p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3985 { PVal6, PVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3986 { PVal6, MVal3, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3987 { PVal6, PVal4, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3988 { PVal6, MVal4, "0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3989 { PVal6, PVal5, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3990 { PVal6, MVal5, "-0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
3991 { PVal6, PVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3992 { PVal6, MVal6, "0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3993 { MVal6, PVal1, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3994 { MVal6, MVal1, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
3995 { MVal6, PVal2, "-0x0.00004p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3996 { MVal6, MVal2, "-0x0.00004p-126", APFloat::opOK, APFloat::fcNormal }, in TEST()
3997 { MVal6, PVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3998 { MVal6, MVal3, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
3999 { MVal6, PVal4, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
4000 { MVal6, MVal4, "-0x1p+0", APFloat::opOK, APFloat::fcNormal }, in TEST()
4001 { MVal6, PVal5, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
4002 { MVal6, MVal5, "0.5", APFloat::opOK, APFloat::fcNormal }, in TEST()
4003 { MVal6, PVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
4004 { MVal6, MVal6, "-0x0p+0", APFloat::opOK, APFloat::fcZero }, in TEST()
4008 APFloat x(SpecialCaseTests[i].x); in TEST()
4009 APFloat y(SpecialCaseTests[i].y); in TEST()
4010 APFloat::opStatus status = x.remainder(y); in TEST()
4012 APFloat result(x.getSemantics(), SpecialCaseTests[i].result); in TEST()
4020 APFloat f1(APFloat::IEEEdouble(), "0x1.3333333333333p-2"); // 0.3 in TEST()
4021 APFloat f2(APFloat::IEEEdouble(), "0x1.47ae147ae147bp-7"); // 0.01 in TEST()
4022 APFloat expected(APFloat::IEEEdouble(), "-0x1.4p-56"); in TEST()
4023 EXPECT_EQ(APFloat::opOK, f1.remainder(f2)); in TEST()
4027 APFloat f1(APFloat::IEEEdouble(), "0x1p64"); // 1.8446744073709552e19 in TEST()
4028 APFloat f2(APFloat::IEEEdouble(), "1.5"); in TEST()
4029 APFloat expected(APFloat::IEEEdouble(), "-0.5"); in TEST()
4030 EXPECT_EQ(APFloat::opOK, f1.remainder(f2)); in TEST()
4034 APFloat f1(APFloat::IEEEdouble(), "0x1p1000"); in TEST()
4035 APFloat f2(APFloat::IEEEdouble(), "0x1p-1000"); in TEST()
4036 APFloat expected(APFloat::IEEEdouble(), "0.0"); in TEST()
4037 EXPECT_EQ(APFloat::opOK, f1.remainder(f2)); in TEST()
4041 APFloat f1 = APFloat::getInf(APFloat::IEEEdouble(), false); in TEST()
4042 APFloat f2(APFloat::IEEEdouble(), "1.0"); in TEST()
4043 EXPECT_EQ(f1.remainder(f2), APFloat::opInvalidOp); in TEST()
4047 APFloat f1(APFloat::IEEEdouble(), "-4.0"); in TEST()
4048 APFloat f2(APFloat::IEEEdouble(), "-2.0"); in TEST()
4049 APFloat expected(APFloat::IEEEdouble(), "-0.0"); in TEST()
4050 EXPECT_EQ(APFloat::opOK, f1.remainder(f2)); in TEST()
4054 APFloat f1(APFloat::IEEEdouble(), "-4.0"); in TEST()
4055 APFloat f2(APFloat::IEEEdouble(), "2.0"); in TEST()
4056 APFloat expected(APFloat::IEEEdouble(), "-0.0"); in TEST()
4057 EXPECT_EQ(APFloat::opOK, f1.remainder(f2)); in TEST()
4064 APFloat::fltCategory, APFloat::roundingMode>; in TEST()
4068 APFloat::fcZero, APFloat::rmNearestTiesToEven), in TEST()
4071 0x7948000000000000ull, 0ull, APFloat::fcInfinity, in TEST()
4072 APFloat::rmNearestTiesToEven), in TEST()
4079 APFloat::fcNormal, APFloat::rmNearestTiesToEven), in TEST()
4083 APFloat::fcInfinity, APFloat::rmNearestTiesToEven), in TEST()
4086 APFloat::fcNaN, APFloat::rmNearestTiesToEven), in TEST()
4091 APFloat::fltCategory Expected; in TEST()
4092 APFloat::roundingMode RM; in TEST()
4096 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4097 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4106 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4107 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4120 uint64_t, APFloat::roundingMode>; in TEST()
4125 APFloat::rmNearestTiesToEven), in TEST()
4129 APFloat::rmNearestTiesToEven), in TEST()
4133 0x3960000000000000ull, APFloat::rmNearestTiesToEven), in TEST()
4137 APFloat::rmNearestTiesToEven), in TEST()
4144 0x7c8ffffffffffffeull, APFloat::rmNearestTiesToEven), in TEST()
4151 0x7c8ffffffffffffeull, APFloat::rmNearestTiesToEven), in TEST()
4156 APFloat::roundingMode RM; in TEST()
4160 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4161 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4174 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4175 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4192 uint64_t, APFloat::roundingMode>; in TEST()
4197 APFloat::rmNearestTiesToEven), in TEST()
4201 APFloat::rmNearestTiesToEven), in TEST()
4206 APFloat::roundingMode RM; in TEST()
4209 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4210 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4226 APFloat::fltCategory, APFloat::roundingMode>; in TEST()
4230 APFloat::fcNaN, APFloat::rmNearestTiesToEven), in TEST()
4232 std::make_tuple(0x7ff8000000000000ull, 0, 0, 0, APFloat::fcNaN, in TEST()
4233 APFloat::rmNearestTiesToEven), in TEST()
4236 APFloat::fcNaN, APFloat::rmNearestTiesToEven), in TEST()
4239 APFloat::fcNaN, APFloat::rmNearestTiesToEven), in TEST()
4242 APFloat::fcInfinity, APFloat::rmNearestTiesToEven), in TEST()
4244 std::make_tuple(0x7ff0000000000000ull, 0, 0, 0, APFloat::fcNaN, in TEST()
4245 APFloat::rmNearestTiesToEven), in TEST()
4248 APFloat::fcInfinity, APFloat::rmNearestTiesToEven), in TEST()
4250 std::make_tuple(0, 0, 0, 0, APFloat::fcZero, in TEST()
4251 APFloat::rmNearestTiesToEven), in TEST()
4253 std::make_tuple(0, 0, 0x3ff0000000000000ull, 0, APFloat::fcZero, in TEST()
4254 APFloat::rmNearestTiesToEven), in TEST()
4259 APFloat::fltCategory Expected; in TEST()
4260 APFloat::roundingMode RM; in TEST()
4264 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4265 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4274 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4275 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4288 uint64_t, APFloat::roundingMode>; in TEST()
4293 APFloat::rmNearestTiesToEven), in TEST()
4297 0x0000000000000001ull, APFloat::rmNearestTiesToEven), in TEST()
4302 APFloat::rmNearestTiesToEven), in TEST()
4306 0xbff0000000000000ull, 0, APFloat::rmNearestTiesToEven), in TEST()
4310 0x0000000000000001ull, APFloat::rmNearestTiesToEven), in TEST()
4314 APFloat::rmNearestTiesToEven), in TEST()
4318 0x7ff0000000000000ull, 0, APFloat::rmNearestTiesToEven), in TEST()
4323 APFloat::rmNearestTiesToEven), in TEST()
4328 APFloat::rmNearestTiesToEven), in TEST()
4333 APFloat::roundingMode RM; in TEST()
4337 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4338 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4351 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4352 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4369 uint64_t, APFloat::roundingMode>; in TEST()
4376 APFloat::rmNearestTiesToEven), in TEST()
4381 APFloat::roundingMode RM; in TEST()
4384 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4385 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4417 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4418 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4452 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4453 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4469 APFloat A(APFloat::PPCDoubleDouble(), "2"); in TEST()
4470 A.fusedMultiplyAdd(APFloat(APFloat::PPCDoubleDouble(), "3"), in TEST()
4471 APFloat(APFloat::PPCDoubleDouble(), "4"), in TEST()
4472 APFloat::rmNearestTiesToEven); in TEST()
4473 EXPECT_EQ(APFloat::cmpEqual, in TEST()
4474 APFloat(APFloat::PPCDoubleDouble(), "10").compare(A)); in TEST()
4479 APFloat A(APFloat::PPCDoubleDouble(), "1.5"); in TEST()
4480 A.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
4481 EXPECT_EQ(APFloat::cmpEqual, in TEST()
4482 APFloat(APFloat::PPCDoubleDouble(), "2").compare(A)); in TEST()
4485 APFloat A(APFloat::PPCDoubleDouble(), "2.5"); in TEST()
4486 A.roundToIntegral(APFloat::rmNearestTiesToEven); in TEST()
4487 EXPECT_EQ(APFloat::cmpEqual, in TEST()
4488 APFloat(APFloat::PPCDoubleDouble(), "2").compare(A)); in TEST()
4494 std::tuple<uint64_t, uint64_t, uint64_t, uint64_t, APFloat::cmpResult>; in TEST()
4499 APFloat::cmpEqual), in TEST()
4502 APFloat::cmpLessThan), in TEST()
4505 APFloat::cmpGreaterThan), in TEST()
4508 0x0000000000000001ull, APFloat::cmpLessThan), in TEST()
4511 APFloat::cmpUnordered), in TEST()
4514 APFloat::cmpUnordered), in TEST()
4517 APFloat::cmpEqual), in TEST()
4522 APFloat::cmpResult Expected; in TEST()
4525 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4526 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4557 APFloat A1(APFloat::PPCDoubleDouble(), APInt(128, 2, Op1)); in TEST()
4558 APFloat A2(APFloat::PPCDoubleDouble(), APInt(128, 2, Op2)); in TEST()
4571 hash_value(APFloat(APFloat::PPCDoubleDouble(), APInt(128, 2, Data1))), in TEST()
4572 hash_value(APFloat(APFloat::PPCDoubleDouble(), APInt(128, 2, Data2)))); in TEST()
4579 APFloat Float(APFloat::PPCDoubleDouble(), APInt(128, 2, Data)); in TEST()
4581 APFloat Actual = in TEST()
4582 APFloat::copySign(Float, APFloat(APFloat::IEEEdouble(), "1")); in TEST()
4587 APFloat Actual = in TEST()
4588 APFloat::copySign(Float, APFloat(APFloat::IEEEdouble(), "-1")); in TEST()
4600 APFloat::getZero(APFloat::PPCDoubleDouble()).bitcastToAPInt()); in TEST()
4607 APFloat::getLargest(APFloat::PPCDoubleDouble()).bitcastToAPInt()); in TEST()
4615 APFloat::getSmallest(APFloat::PPCDoubleDouble()).bitcastToAPInt()); in TEST()
4620 APFloat::getSmallestNormalized(APFloat::PPCDoubleDouble()) in TEST()
4629 APFloat::getZero(APFloat::PPCDoubleDouble(), true).bitcastToAPInt()); in TEST()
4637 APFloat::getLargest(APFloat::PPCDoubleDouble(), true).bitcastToAPInt()); in TEST()
4644 APFloat::getSmallest(APFloat::PPCDoubleDouble(), true) in TEST()
4652 APFloat::getSmallestNormalized(APFloat::PPCDoubleDouble(), true) in TEST()
4655 EXPECT_TRUE(APFloat::getSmallest(APFloat::PPCDoubleDouble()).isSmallest()); in TEST()
4656 EXPECT_TRUE(APFloat::getLargest(APFloat::PPCDoubleDouble()).isLargest()); in TEST()
4660 EXPECT_TRUE(APFloat::getSmallest(APFloat::PPCDoubleDouble()).isDenormal()); in TEST()
4661 EXPECT_FALSE(APFloat::getLargest(APFloat::PPCDoubleDouble()).isDenormal()); in TEST()
4663 APFloat::getSmallestNormalized(APFloat::PPCDoubleDouble()).isDenormal()); in TEST()
4670 APFloat(APFloat::PPCDoubleDouble(), APInt(128, 2, Data)).isDenormal()); in TEST()
4679 APFloat Result = in TEST()
4680 scalbn(APFloat(APFloat::PPCDoubleDouble(), APInt(128, 2, Input)), 1, in TEST()
4681 APFloat::rmNearestTiesToEven); in TEST()
4694 APFloat Result = in TEST()
4695 frexp(APFloat(APFloat::PPCDoubleDouble(), APInt(128, 2, Input)), Exp, in TEST()
4696 APFloat::rmNearestTiesToEven); in TEST()
4703 APFloat MaxX87Val = APFloat::getLargest(APFloat::x87DoubleExtended()); in TEST()
4708 APFloat F(APFloat::x87DoubleExtended(), "-1.0"); in TEST()