Proper arithmetic casting