first rough implementation of remainder
be more specific with Interval.remainder (java has a weird sign convention)
now Interval.remainder handles all relevant cases (so I believe)