cast each term seperately to avoid integer division, CID 60868