2018-05-07 Python math.log(243,3) problem ProblemIn python: 1234>>> import math>>> math.log(243,3)4.999999999999999# Expected: 5 Solution 123>>> import math>>> math.log10(243)/math.log10(3)5 123456789>>> import math>>> x = math.log(243,3)# Judge whether an int>>> judge = (round(x)-x) < 0.0000001True# get the Int value>>> round(x) Newer float to int & float 精度转换 Older ASCII ord() chr()