Better detection of zero-equivalence in calculate_series()