text: /******************************************************************************
   *                      Code generated with sympy 0.7.6                       *
   *                                                                            *
   *              See http://www.sympy.org/ for more information.               *
   *                                                                            *
   *                       This file is part of 'project'                       *
   ******************************************************************************/
  #include "middle_prox_middle_prox_bend_2.h"
  #include <math.h>
  
  double middle_prox_middle_prox_bend_2(double fore_arm_bend, double fore_arm_side, double hind_arm_bend, double local_x, double local_z, double middle_metacarpal_bend, double middle_metacarpal_side, double middle_prox_bend, double middle_prox_length, double middle_prox_side, double root_scale) {
  
     double middle_prox_middle_prox_bend_2_result;
     middle_prox_middle_prox_bend_2_result = local_x*(-((((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*cos(middle_metacarpal_bend) - (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*sin(middle_metacarpal_bend))*cos(middle_prox_side) + (-(-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*sin(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*cos(middle_metacarpal_side))*sin(middle_prox_side))*sin(middle_prox_bend) - (((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*sin(middle_metacarpal_bend) + (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*cos(middle_metacarpal_bend))*cos(middle_prox_bend)) + local_z*(((((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*cos(middle_metacarpal_bend) - (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*sin(middle_metacarpal_bend))*cos(middle_prox_side) + (-(-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*sin(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*cos(middle_metacarpal_side))*sin(middle_prox_side))*cos(middle_prox_bend) - (((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*sin(middle_metacarpal_bend) + (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*cos(middle_metacarpal_bend))*sin(middle_prox_bend)) + middle_prox_length*root_scale*(-((((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*cos(middle_metacarpal_bend) - (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*sin(middle_metacarpal_bend))*cos(middle_prox_side) + (-(-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*sin(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*cos(middle_metacarpal_side))*sin(middle_prox_side))*sin(middle_prox_bend) - (((-sin(fore_arm_bend)*cos(hind_arm_bend) - sin(hind_arm_bend)*cos(fore_arm_bend)*cos(fore_arm_side))*cos(middle_metacarpal_side) + sin(fore_arm_side)*sin(hind_arm_bend)*sin(middle_metacarpal_side))*sin(middle_metacarpal_bend) + (-sin(fore_arm_bend)*sin(hind_arm_bend)*cos(fore_arm_side) + cos(fore_arm_bend)*cos(hind_arm_bend))*cos(middle_metacarpal_bend))*cos(middle_prox_bend));
     return middle_prox_middle_prox_bend_2_result;
  
  }
  