longest_monotonic_subsequence supports sequences of floating points