Determine upper and lower bounds (#817)