optimize away useless divisions