Hi, Ioannis,

for those calculations ... I suggest you to have a look here : https://www.miscel.dk/MiscEl/miscel.html
e
specially here : https://www.miscel.dk/MiscEl/miscelIntegerMath.html

t
he program is a bit old ... but just answer "yes" if it shows an error , and it will run fine ...

best regards
Alain