08-18-2022, 10:08 PM
01234567890 (leading zero for forum formatting.)
-9876543210
=========
Sign is -, as 9876543210 > 1235667890.
09876543210
-1234567890
==========
Take 3 digits from top, 2 digits from bottom. Subtract 210 - 90 = 120. Right 2 digits is answer, substitute left digit back up top for carryover.
098765431
-12345678
=========
???????????20
Continue process, but with 18/17 digits at a time for unsigned int64 limits.
-9876543210
=========
Sign is -, as 9876543210 > 1235667890.
09876543210
-1234567890
==========
Take 3 digits from top, 2 digits from bottom. Subtract 210 - 90 = 120. Right 2 digits is answer, substitute left digit back up top for carryover.
098765431
-12345678
=========
???????????20
Continue process, but with 18/17 digits at a time for unsigned int64 limits.