A rigorous divide-and-conquer algorithm for fast DC-mode extraction