After watching this video I've decided to make my own reverse addition palindromic number calculator.
From Wikipedia;
A palindromic number or numeral palindrome is a number that remains the same when its digits are reversed. Like 16461, for example, it is "symmetrical". The term palindromic is derived from palindrome, which refers to a word (such as rotor or racecar) whose spelling is unchanged when its letters are reversed.
So if we enter number 395 as an input, calculation works like;
395 + 593 = 988
988 + 889 = 1877
1877 + 7781 = 9658
9658 + 8569 = 18227
18227 + 72281 = 90508
90508 + 80509 = 171017
171017 + 710171 = 881188
until result of addition is palindromic number.
Because of working with big integers there is no explicit limit for input or calculations.
If you enter 1186060307891929990
as an input. It will going to find palindromic number in 261 calculation cycles.
It will probably run forever.
Usage is very simple and there is only 3 flags exists.
-l (uint) : Cycle limit for calculating palindromic number (default 0 means no limit)
-n (string) : Sets test number for calculating palindromic number (accepst only base 10 numbers)
-nolog : Truncates reversal add operation logs
For calculating palindrome of 395
go-palindrome -n 395
For calculating palindrome of 196 but limiting calculation cycle on 1000
go-palindrome -n 196 -l 1000
For calculating palindrome of 196 but limiting calculation cycle on 1000 and not print calculation operation logs
go-palindrome -n 196 -l 1000 -nolog