This is a standard quadratic formula, put it in the form
a*y^2+b*y+c=0
and the solutions are
y1=(-b+sqrt(b^2-4*a*c))/(2*a)
y2=(-b-sqrt(b^2-4*a*c))/(2*a)
now that you have both solutions, use operations like
y=(y>=0)*(y<=1)*y;
but you probably have some continuity requirements that you want to implement. If you want to do it quickly for only 100 points I would suggest a for-loop with if-statements.