bugfix in evaluation of remainder_e