Bug 1024857 reduce useless math r=@erikvold