z = load("rand53");
n = length(z);
n2 = ceil(n/2);
z = sort(z, "descend");
zmed = median(z);
z -= zmed;
zplus = z(z >= 0);
zminus = z(z <= 0)';
zz = (zplus + zminus)./(zplus - zminus);
zz(isnan(zz)) = 0;
zzsort = sort(zz(:), "descend");
medc_idx = ceil(n2^2/2);
mc = zzsort(medc_idx);
printf("%.16g\n", mc);
