Applying arithmetic identities to integer code