*computes ihi inhi ilo
.control
let ilo=0
if y[0] gt y[1]
	let inhi=1
	let ihi=1
else
	let inhi=0
	let ihi=0
end
let m=0
while m lt mpts
	if y[m] le y[ilo]
		let ilo=m
	end
	if y[m] gt y[ihi]
		let inhi=ihi
		let ihi=m
	else
		if y[m]>y[inhi]
			if m ne ihi
				let inhi=m
			end
		end
	end
	let m=m+1
end
echo -n "iteration:$&cnt  = "
print funcval
.endc


