Fails expectations, infinite loop.
Some changes.
All tests passing.
Merge pull request #163 from pleroy/UnIntervalle

Fix a number of bugs when the integration takes place on a single interval