Offset bug with delta < 1

One-liner fix to a problem using integer instead of double version of abs(). Also, adds a test case for the problem.