[FIX] #16: Fix calculation logic in calculate_half_a1_b1_general method to handle cases where long is less than twice the short length
Closes #16