Commit 7fc8c63
committed
Correcting two double 1e-15 constant calculations.
In recent commits started setting two 1e-15 values with the calculation:
= 1/std::numeric_limits<DBL>::digits10;
when I meant to code:
= 1/pow(10,std::numeric_limits<DBL>::digits10);
Both forms bad practice in not being specific as to the types for the
explicit values. The first returns integer 0, later cast to double and I got
away with it in all but my full set of test cases. Corrected:
= (DBL)1.0/pow((DBL)10.0,std::numeric_limits<DBL>::digits10);1 parent ca6015d commit 7fc8c63
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
0 commit comments