@jip well the problem I'm seeing is the exponent, isn't being seen as such when a direct comparison is made. In this instance the script is comparing the units current location vs the surface height. Should the units elevation be lower than the surface the unit is warped to the surface.
If you look and those end values of the above WARN outputs, the exponents are pretty small values, but show up as whole numbers.
Rather than -6.103515625e-005, the script sees "-6". Causing the unit the warp over and over again.
What's needed here is a way to limit the results to just 2 or 3 decimal places.