@@ -483,7 +483,7 @@ void BondTest::testCached() {
483
483
bondDayCount, Compounded, freq);
484
484
if (std::fabs (price-cachedPrice1a) > tolerance) {
485
485
BOOST_FAIL (" failed to reproduce cached price:"
486
- << QL_FIXED
486
+ << std::fixed
487
487
<< " \n calculated: " << price
488
488
<< " \n expected: " << cachedPrice1a
489
489
<< " \n tolerance: " << tolerance
@@ -493,7 +493,7 @@ void BondTest::testCached() {
493
493
price = bond1.cleanPrice ();
494
494
if (std::fabs (price-cachedPrice1b) > tolerance) {
495
495
BOOST_FAIL (" failed to reproduce cached price:"
496
- << QL_FIXED
496
+ << std::fixed
497
497
<< " \n calculated: " << price
498
498
<< " \n expected: " << cachedPrice1b
499
499
<< " \n tolerance: " << tolerance
@@ -534,7 +534,7 @@ void BondTest::testCached() {
534
534
price = BondFunctions::cleanPrice (bond2, marketYield2, bondDayCount, Compounded, freq);
535
535
if (std::fabs (price-cachedPrice2a) > tolerance) {
536
536
BOOST_FAIL (" failed to reproduce cached price:"
537
- << QL_FIXED
537
+ << std::fixed
538
538
<< " \n calculated: " << price
539
539
<< " \n expected: " << cachedPrice2a
540
540
<< " \n tolerance: " << tolerance
@@ -544,7 +544,7 @@ void BondTest::testCached() {
544
544
price = bond2.cleanPrice ();
545
545
if (std::fabs (price-cachedPrice2b) > tolerance) {
546
546
BOOST_FAIL (" failed to reproduce cached price:"
547
- << QL_FIXED
547
+ << std::fixed
548
548
<< " \n calculated: " << price
549
549
<< " \n expected: " << cachedPrice2b
550
550
<< " \n tolerance: " << tolerance
@@ -605,7 +605,7 @@ void BondTest::testCached() {
605
605
bondDayCount, Compounded, freq, settlementDate);
606
606
if (std::fabs (price-cachedPrice3) > tolerance) {
607
607
BOOST_FAIL (" failed to reproduce cached price:"
608
- << QL_FIXED
608
+ << std::fixed
609
609
<< " \n calculated: " << price << " "
610
610
<< " \n expected: " << cachedPrice3 << " "
611
611
<< " \n error: " << price-cachedPrice3);
@@ -619,7 +619,7 @@ void BondTest::testCached() {
619
619
price = BondFunctions::cleanPrice (bond3, marketYield3, bondDayCount, Compounded, freq);
620
620
if (std::fabs (price-cachedPrice3) > tolerance) {
621
621
BOOST_FAIL (" failed to reproduce cached price:"
622
- << QL_FIXED
622
+ << std::fixed
623
623
<< " \n calculated: " << price << " "
624
624
<< " \n expected: " << cachedPrice3 << " "
625
625
<< " \n error: " << price-cachedPrice3);
@@ -661,7 +661,7 @@ void BondTest::testCachedZero() {
661
661
Real price = bond1.cleanPrice ();
662
662
if (std::fabs (price-cachedPrice1) > tolerance) {
663
663
BOOST_FAIL (" failed to reproduce cached price:\n "
664
- << QL_FIXED
664
+ << std::fixed
665
665
<< " calculated: " << price << " \n "
666
666
<< " expected: " << cachedPrice1 << " \n "
667
667
<< " error: " << price-cachedPrice1);
@@ -681,7 +681,7 @@ void BondTest::testCachedZero() {
681
681
price = bond2.cleanPrice ();
682
682
if (std::fabs (price-cachedPrice2) > tolerance) {
683
683
BOOST_FAIL (" failed to reproduce cached price:\n "
684
- << QL_FIXED
684
+ << std::fixed
685
685
<< " calculated: " << price << " \n "
686
686
<< " expected: " << cachedPrice2 << " \n "
687
687
<< " error: " << price-cachedPrice2);
@@ -701,7 +701,7 @@ void BondTest::testCachedZero() {
701
701
price = bond3.cleanPrice ();
702
702
if (std::fabs (price-cachedPrice3) > tolerance) {
703
703
BOOST_FAIL (" failed to reproduce cached price:\n "
704
- << QL_FIXED
704
+ << std::fixed
705
705
<< " calculated: " << price << " \n "
706
706
<< " expected: " << cachedPrice3 << " \n "
707
707
<< " error: " << price-cachedPrice3);
@@ -746,7 +746,7 @@ void BondTest::testCachedFixed() {
746
746
Real price = bond1.cleanPrice ();
747
747
if (std::fabs (price-cachedPrice1) > tolerance) {
748
748
BOOST_FAIL (" failed to reproduce cached price:\n "
749
- << QL_FIXED
749
+ << std::fixed
750
750
<< " calculated: " << price << " \n "
751
751
<< " expected: " << cachedPrice1 << " \n "
752
752
<< " error: " << price-cachedPrice1);
@@ -773,7 +773,7 @@ void BondTest::testCachedFixed() {
773
773
price = bond2.cleanPrice ();
774
774
if (std::fabs (price-cachedPrice2) > tolerance) {
775
775
BOOST_FAIL (" failed to reproduce cached price:\n "
776
- << QL_FIXED
776
+ << std::fixed
777
777
<< " calculated: " << price << " \n "
778
778
<< " expected: " << cachedPrice2 << " \n "
779
779
<< " error: " << price-cachedPrice2);
@@ -799,7 +799,7 @@ void BondTest::testCachedFixed() {
799
799
price = bond3.cleanPrice ();
800
800
if (std::fabs (price-cachedPrice3) > tolerance) {
801
801
BOOST_FAIL (" failed to reproduce cached price:\n "
802
- << QL_FIXED
802
+ << std::fixed
803
803
<< " calculated: " << price << " \n "
804
804
<< " expected: " << cachedPrice3 << " \n "
805
805
<< " error: " << price-cachedPrice3);
@@ -862,7 +862,7 @@ void BondTest::testCachedFloating() {
862
862
Real price = bond1.cleanPrice ();
863
863
if (std::fabs (price-cachedPrice1) > tolerance) {
864
864
BOOST_FAIL (" failed to reproduce cached price:\n "
865
- << QL_FIXED
865
+ << std::fixed
866
866
<< " calculated: " << price << " \n "
867
867
<< " expected: " << cachedPrice1 << " \n "
868
868
<< " error: " << price-cachedPrice1);
@@ -893,7 +893,7 @@ void BondTest::testCachedFloating() {
893
893
price = bond2.cleanPrice ();
894
894
if (std::fabs (price-cachedPrice2) > tolerance) {
895
895
BOOST_FAIL (" failed to reproduce cached price:\n "
896
- << QL_FIXED
896
+ << std::fixed
897
897
<< " calculated: " << price << " \n "
898
898
<< " expected: " << cachedPrice2 << " \n "
899
899
<< " error: " << price-cachedPrice2);
@@ -928,7 +928,7 @@ void BondTest::testCachedFloating() {
928
928
price = bond3.cleanPrice ();
929
929
if (std::fabs (price-cachedPrice3) > tolerance) {
930
930
BOOST_FAIL (" failed to reproduce cached price:\n "
931
- << QL_FIXED
931
+ << std::fixed
932
932
<< " calculated: " << price << " \n "
933
933
<< " expected: " << cachedPrice3 << " \n "
934
934
<< " error: " << price-cachedPrice3);
@@ -1012,7 +1012,7 @@ void BondTest::testBrazilianCached() {
1012
1012
1013
1013
if (std::fabs (price-cachedPrice) > tolerance) {
1014
1014
BOOST_ERROR (" failed to reproduce Andima cached price:\n "
1015
- << QL_FIXED
1015
+ << std::fixed
1016
1016
<< " calculated: " << price << " \n "
1017
1017
<< " expected: " << cachedPrice << " \n "
1018
1018
<< " error: " << price-cachedPrice << " \n "
@@ -1372,7 +1372,7 @@ void BondTest::testBondFromScheduleWithDateVector()
1372
1372
Real tolerance = 1e-5 ;
1373
1373
if (std::fabs (calculatedPrice - expectedPrice) > tolerance) {
1374
1374
BOOST_FAIL (" failed to reproduce R2048 dirty price"
1375
- << QL_FIXED << std::setprecision (5 )
1375
+ << std::fixed << std::setprecision (5 )
1376
1376
<< " \n expected: " << expectedPrice
1377
1377
<< " \n calculated: " << calculatedPrice);
1378
1378
}
0 commit comments