def mod(x:float, y:float, z:float=0.0) -> float:
    """
    Return the remainder on division of x by y with offset z.

    Note, float value is returned

    """
    return x - ((x - z) - (x - z) % y)