define gradient at zero to be zero