Approximation of a functional depending on jumps and corners