This function is used when solving an equation in the solver app (TIINSLVR). "ub" is short for "upper bound".