v = math.log10 (v)
Log to the base 10 of v. math.log10 (123456) --> 5.0915122016278 10 ^ 5.0915122016278 --> 123456.00000001 (slight rounding error)
math.log10 (123456) --> 5.0915122016278 10 ^ 5.0915122016278 --> 123456.00000001 (slight rounding error)