## <del>JavaScript ES6, 38 bytes</del> a=i=>i>70?a(Math.floor(i/10)-i%10*2):i Fails with `36893488147419103232` and using `~~(1/10)` will also fail for `700168844221` Test: <!-- begin snippet: js hide: false --> <!-- language: lang-js --> a=i=>i>70?a(Math.floor(i/10)-i%10*2):i O.textContent = O.textContent.replace(/(-?\d+) +(-?\d+)/g, (_,i,o) => _+": "+(a(+i)==o?"OK":"Fail") ); <!-- language: lang-html --> <pre id=O>1 1 10 10 100 10 13 13 42 42 2016 0 9 9 99 -9 9999 -3 12345 3 700168844221 70 36893488147419103232 32</pre> <!-- end snippet -->