Compare linear functions