Decompose rational function with distinct linear factors (#564)