Please note that tt = pow(V, 0.16); is called 1500 times in the above example for only 15 different

I'm pretty sure that the compiler would notice that, too. In the machine code, that would have been moved out of the inner loop, since in that loop the value never changes. Unless V or tt are marked volatile.

I'm pretty sure that the compiler would notice that, too. In the machine code, that would have been moved out of the inner loop, since in that loop the value never changes. Unless V or tt are marked volatile.

V changes in the inner loop, thats why it is called 1500 times see code below