Representing interval orders by a single real-valued function