I was doing some coding and i needed the Log function from the math Lib so I used it, but I got a weird result in the case of Log(1000) base 10
from math import log print(log(1000,10))
I am getting 2.9999999999999996 instead of 3
can anyone explain to me why this is happening ?
and what to do to get a correct results
Thank you for your time