code: def _zmaxFindStart(z,Ez,pot):
      
      if z == 0.: ztry= 0.00001
      else: ztry= 2.*nu.fabs(z)
      while (Ez-potentialVertical(ztry,pot)) > 0.:
          ztry*= 2.
          if ztry > 100.: #pragma: no cover
              raise OverflowError
      return ztry
docs: NAME:
         _zmaxFindStart
      PURPOSE:
         Find adequate end point to solve for zmax
      INPUT:
         z - height
         Ez - vertical energy
         pot - potential
      OUTPUT:
         zend
      HISTORY:
         2012-06-01 - Written - Bovy (IAS)