Doing 'log' maths without a log function