in reply to log() and int() problem

log returns a floating point value, not an integer. See this FAQ