      static double mp_list_find(_cimg_math_parser& mp) {
        const unsigned int
          indi = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width());
        const CImg<T> &img = mp.imglist[indi];
        const int _step = (int)_mp_arg(5), step = _step?_step:-1;
        const ulongT siz = (ulongT)img.size();
        longT ind = (longT)(mp.opcode[4]!=_cimg_mp_slot_nan?_mp_arg(4):step>0?0:siz - 1);
        if (ind<0 || ind>=(longT)siz) return -1.;
        const T
          *const ptrb = img.data(),
          *const ptre = img.end(),
          *ptr = ptrb + ind;
        const double val = _mp_arg(3);

        // Forward search
        if (step>0) {
          while (ptr<ptre && (double)*ptr!=val) ptr+=step;
          return ptr>=ptre?-1.:(double)(ptr - ptrb);
        }

        // Backward search.
        while (ptr>=ptrb && (double)*ptr!=val) ptr+=step;
        return ptr<ptrb?-1.:(double)(ptr - ptrb);
      }
      static double mp_list_find(_cimg_math_parser& mp) {
        const unsigned int
          indi = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width());
        const CImg<T> &img = mp.imglist[indi];
        const int _step = (int)_mp_arg(5), step = _step?_step:-1;
        const ulongT siz = (ulongT)img.size();
        longT ind = (longT)(mp.opcode[4]!=_cimg_mp_slot_nan?_mp_arg(4):step>0?0:siz - 1);
        if (ind<0 || ind>=(longT)siz) return -1.;
        const T
          *const ptrb = img.data(),
          *const ptre = img.end(),
          *ptr = ptrb + ind;
        const double val = _mp_arg(3);

         
        if (step>0) {
          while (ptr<ptre && (double)*ptr!=val) ptr+=step;
          return ptr>=ptre?-1.:(double)(ptr - ptrb);
        }

         
        while (ptr>=ptrb && (double)*ptr!=val) ptr+=step;
        return ptr<ptrb?-1.:(double)(ptr - ptrb);
      }