      static double mp_sort(_cimg_math_parser& mp) {
        double *const ptrd = &_mp_arg(1) + 1;
        const double *const ptrs = &_mp_arg(2) + 1;
        const bool is_increasing = (bool)_mp_arg(4);
        const unsigned int
          siz = (unsigned int)mp.opcode[3],
          nb_elts = mp.opcode[5]==~0U?siz:(unsigned int)_mp_arg(5),
          siz_elt = (unsigned int)_mp_arg(6);
        const ulongT sn = siz_elt*nb_elts;
        if (sn>siz || siz_elt<1)
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function 'sort()': "
                                      "Arguments 'nb_elts=%g' and 'siz_elt=%g' are invalid "
                                      "for sorting a vector of size %u.",
                                      mp.imgin.pixel_type(),_mp_arg(5),_mp_arg(6),siz);
        CImg<doubleT>(ptrd,siz_elt,nb_elts,1,1,true) = CImg<doubleT>(ptrs,siz_elt,nb_elts,1,1,true).
          get_sort(is_increasing,siz_elt>1?'y':0);
        if (sn<siz) CImg<doubleT>(ptrd + sn,siz - sn,1,1,1,true) = CImg<doubleT>(ptrs + sn,siz - sn,1,1,1,true);
        return cimg::type<double>::nan();
      }
      static double mp_sort(_cimg_math_parser& mp) {
        double *const ptrd = &_mp_arg(1) + 1;
        const double *const ptrs = &_mp_arg(2) + 1;
        const bool is_increasing = (bool)_mp_arg(4);
        const unsigned int
          siz = (unsigned int)mp.opcode[3],
          nb_elts = mp.opcode[5]==~0U?siz:(unsigned int)_mp_arg(5),
          siz_elt = (unsigned int)_mp_arg(6);
        const ulongT sn = siz_elt*nb_elts;
        if (sn>siz || siz_elt<1)
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function 'sort()': "
                                      "Arguments 'nb_elts=%g' and 'siz_elt=%g' are invalid "
                                      "for sorting a vector of size %u.",
                                      mp.imgin.pixel_type(),_mp_arg(5),_mp_arg(6),siz);
        CImg<doubleT>(ptrd,siz_elt,nb_elts,1,1,true) = CImg<doubleT>(ptrs,siz_elt,nb_elts,1,1,true).
          get_sort(is_increasing,siz_elt>1?'y':0);
        if (sn<siz) CImg<doubleT>(ptrd + sn,siz - sn,1,1,1,true) = CImg<doubleT>(ptrs + sn,siz - sn,1,1,1,true);
        return cimg::type<double>::nan();
      }