Closed vyivel closed 2 years ago
Side note: I think that part can be simplified to something like the following pseudocode.
xi_parity = compute_mul_parity().parity
if (!xi_parity) {
if (!include_left_endpoint) {
goto small_divisor_case_label
}
// x(i) is an even number and the left endpoint is included, check if x is an integer
if (exponent < case_fc_pm_half_lower_threshold || exponent > case_fc_pm_half_lower_threshold) {
goto small_divisor_case_label
}
x_is_integer = compute_mul_parity().is_integer
if (!x_is_integer) {
goto small_divisor_case_label
}
}
This matches Algorithm 5.2 (step 7) more closely.
Hmm. This is indeed weird. I don't know why I wrote it like that 😂 Probably I came up with some wrong idea, tested it, figured out I was wrong, so corrected the code but in a stupid way, and also forgot to rewrite the paper. Thanks a lot for catching this!! I'll correct it right away.
Thanks again, it's fixed now.
(section 5.1.6, page 21)
If I understand this correctly, the condition of the left endpoint being excluded or x not being an integer is enough to say that the intersection in question is empty, and the parity doesn't need to be checked.
However, the algorithm implementation seems to disagree:
In fact, the comments explicitly state that checking parity is required. From quick testing it seems that the code is right here.