常用对数

基本类型 / 数字 / 数学运算

from math import log, log10

number = 1000
result = log10(number)
# result is 3.0

# log(x, 10) divides two logs: not exact
via_log = log(number, 10)
# via_log is 2.9999999999999996

print(f"{result = }")
print(f"{via_log = }")