File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -142,18 +142,13 @@ static inline void bc_standard_div(
142
142
* Since B = 10^b, the formula becomes:
143
143
* MAX_E = (n2_high * B * (B^k - 1)) / (n2_high * (n2_high * B^k + B^k - 1))
144
144
* MAX_E = (10^x * 10^b * ((10^b)^k - 1)) / (10^x * (10^x * (10^b)^k + (10^b)^k - 1))
145
- * MAX_E = (10^(x + b) * (10^(k * b) - 1)) / (10^(2x + k * b) + 10^(x + k * b) + 10^x)
146
- * MAX_E = (10^(x + b) * (10^(k * b) - 1)) / (10^(x + k * b) * (10^x + 1) + 10^x)
147
145
*
148
- * Now let's make an approximation. Remove -1 from the numerator and +1 from the denominator. Approximate
149
- * the numerator to be large and the denominator to be small, such that MAX_E is less than this expression.
150
- * MAX_E = (10^(x + b) * (10^(k * b) - 1)) / (10^(x + k * b) * (10^x + 1) + 10^x)
151
- * MAX_E < (10^(x + b) * 10^(k * b)) / (10^(x + k * b) * 10^x + 10^x)
152
- * MAX_E < (10^(x + k + 2b)) / (10^x * (10^(x + k * b) + 1))
146
+ * Now let's make an approximation. Remove -1 from the numerator. Approximate the numerator to be
147
+ * large and the denominator to be small, such that MAX_E is less than this expression.
148
+ * Also, the denominator "(10^b)^k - 1" is never a negative value, so delete it.
153
149
*
154
- * Approximate again and remove +1 in the denominator
155
- * MAX_E < 10^(x + k + 2b) / (10^x * (10^(x + k * b) + 1))
156
- * MAX_E < 10^(x + k + 2b) / (10^x * 10^(x + k * b))
150
+ * MAX_E = (10^x * 10^b * ((10^b)^k - 1)) / (10^x * (10^x * (10^b)^k + (10^b)^k - 1))
151
+ * MAX_E < (10^x * 10^b * (10^b)^k) / (10^x * 10^x * (10^b)^k)
157
152
* MAX_E < 10^b / 10^x
158
153
* MAX_E < 10^(b - x)
159
154
*
You can’t perform that action at this time.
0 commit comments