[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master efb1d1a 2/2: Augment unit tests
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master efb1d1a 2/2: Augment unit tests |
Date: |
Wed, 21 Mar 2018 19:30:21 -0400 (EDT) |
branch: master
commit efb1d1a7014368d94ce4e245129de1759b7f47ad
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Augment unit tests
---
miscellany_test.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/miscellany_test.cpp b/miscellany_test.cpp
index 1da6fbb..8f04677 100644
--- a/miscellany_test.cpp
+++ b/miscellany_test.cpp
@@ -318,6 +318,11 @@ void test_scale_power()
);
}
+ if(D::has_infinity)
+ {
+ BOOST_TEST_EQUAL( 0, scale_power( 9, D::infinity(),
D::infinity()));
+ }
+
// Test positive and negative zeros.
BOOST_TEST_EQUAL( 0, scale_power( 9, 0.0,
0.0));
@@ -380,8 +385,8 @@ void test_scale_power()
BOOST_TEST_EQUAL( 9, scale_power( 9, 0.0,
999'999'999'999'999.1));
// In the last test above, the threshold is not 999'999'999'999'999.01
- // as a logarithm-based algorithm that rounds fractions toward
- // infinity would have it (with infinite-precision real numbers),
+ // as the scale_power() algorithm, which rounds fractions toward
+ // infinity, would have it (with infinite-precision real numbers),
// because 'binary64' doesn't have seventeen exact decimal digits.
// In this range, successive values show a granularity of 1/8: