automatic differentiation and change expression ordering