fix ZeroDivisionError if both orig and result are zero.
Merge pull request #1327 from veroc/hotfix_upstream

fix ZeroDivisionError if both orig and result are zero.