--- from: http://rosettacode.org/wiki/P-Adic_numbers,_basic note: mathematics