consider dividing the value space into cells in each bin containing a count of values ββin a range.
You can try to make the bins smaller around the point where you expect the quantile to look.
If you make the number of bins large enough, this should work well.
source share