Solved by albanD in post #7 
              
              
                Hi, 
The ** expression routes to the pow operation. 
The reason why one works and not the other is because of the way the derivatives are computed: 

For sqrt, for better performance, the result is reused as you can see here (you don’t need to understand the semantic but the point is that result is …