Structure-preserving function derivatives