import math


def trunc(val):
    """Return the integer closest to the supplied value in the direction of zero"""
    
    if val < 0:
        return math.ceil(val)
    elif val > 0:
        return math.floor(val)
    else:
        return val