from typing import Tuple
import math


def get_roll_and_shift(
    input_offset: Tuple[float, ...],
    target_offset: Tuple[float, ...]
) -> Tuple[Tuple[int, ...], Tuple[float, ...]]:
  """Decomposes delta as integer `roll` and positive fractional `shift`."""
  delta = [t - i for t, i in zip(target_offset, input_offset)]
  roll = tuple(-math.floor(d) for d in delta)
  shift = tuple(d + r for d, r in zip(delta, roll))
  return roll, shift