|
67 | 67 | # Consider an operation ill-conditioned if |
68 | 68 | # it will only have up to 3 significant digits in base 10 remaining. |
69 | 69 | # https://en.wikipedia.org/wiki/Condition_number |
70 | | - float64_t InvConditionNumber = EpsF64 * 1e3 |
| 70 | + float64_t InvCondTol = EpsF64 * 1e3 |
71 | 71 |
|
72 | 72 | cdef bint is_monotonic_increasing_start_end_bounds( |
73 | 73 | ndarray[int64_t, ndim=1] start, ndarray[int64_t, ndim=1] end |
@@ -551,7 +551,7 @@ cdef void add_skew(float64_t val, int64_t *nobs, |
551 | 551 |
|
552 | 552 | m3_update = delta_n * fma(term1, n - 2.0, -3.0 * m2[0]) |
553 | 553 | new_m3 = m3[0] + m3_update |
554 | | - if (fabs(m3_update) + fabs(m3[0])) * InvConditionNumber > fabs(new_m3): |
| 554 | + if (fabs(m3_update) + fabs(m3[0])) * InvCondTol > fabs(new_m3): |
555 | 555 | # possible catastrophic cancellation |
556 | 556 | numerically_unstable[0] = True |
557 | 557 |
|
@@ -597,7 +597,7 @@ cdef void remove_skew(float64_t val, int64_t *nobs, |
597 | 597 | m3_update = delta_n * fma(term1, n + 2.0, -3.0 * m2[0]) |
598 | 598 | new_m3 = m3[0] - m3_update |
599 | 599 |
|
600 | | - if (fabs(m3_update) + fabs(m3[0])) * InvConditionNumber > fabs(new_m3): |
| 600 | + if (fabs(m3_update) + fabs(m3[0])) * InvCondTol > fabs(new_m3): |
601 | 601 | # possible catastrophic cancellation |
602 | 602 | numerically_unstable[0] = True |
603 | 603 |
|
|
0 commit comments