Add an option that makes it possible to ensure that the last point is exactly for Tmax; make sure that we never exceed Tmax

Still keeping a ``/ 2`` to avoid a very small last interval (better make it a bit bigger).  Over than that, I think that overshooting is now properly addressed.