code generation of equations