function [val, isterm, dir] = totalZero(~,y)

val = min((y(7) - 1e-16),(y(1) - 1));
isterm = 1;
dir = -1;
