    inline double rand(const double val_max, cimg_uint64 *const p_rng) {
      const double val = cimg::_rand(p_rng)/(double)~0U;
      return val_max*val;
    }
    inline double rand(const double val_max, cimg_uint64 *const p_rng) {
      const double val = cimg::_rand(p_rng)/(double)~0U;
      return val_max*val;
    }