Skip to content

Commit

Permalink
Minor bugFix in the real_explicit and real_algorithm iterator constru…
Browse files Browse the repository at this point in the history
…ctor
  • Loading branch information
Laouen committed Aug 13, 2018
1 parent a9573cf commit a98de30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int main() {
```cpp
c: 0.999999
d: 0.999999
e iteration [1.8, 1.10]
e iteration [1.8, 2]
e iteration [1.98, 2]
e iteration [1.998, 2]
e iteration [1.9998, 2]
Expand Down
2 changes: 1 addition & 1 deletion include/real/real_algorithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace boost {
int first_digit = (*this->_real_ptr)[0];
this->approximation_interval.lower_bound.digits.push_back(first_digit);

if (first_digit == 10) {
if (first_digit == 9) {
this->approximation_interval.upper_bound.digits.push_back(1);
this->approximation_interval.upper_bound.exponent++;
} else {
Expand Down
2 changes: 1 addition & 1 deletion include/real/real_explicit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace boost {
int first_digit = this->_real_ptr->_digits[0];
this->approximation_interval.lower_bound.digits.push_back(first_digit);

if (first_digit == 10) {
if (first_digit == 9) {
this->approximation_interval.upper_bound.digits.push_back(1);
this->approximation_interval.upper_bound.exponent++;
} else if (this->_n < (int)this->_real_ptr->_digits.size()) {
Expand Down

0 comments on commit a98de30

Please sign in to comment.