Input estimation with application to differentiation