Sturm sequence method forked from: https://github.com/jarvist/LongSnakeMoan