Can you add a short explanation about the used algorithm? I can retrace when playing with the numbers, but I don't really know, why `larger / smaller / larger+smaller` is reversed controversial.