Simple q-digest implementation.