Note: luminosity distance does not seem to be transitive, which calls the whole exercise into question for that algorithm.