How is pow() calculated in C?
Our professor said that you can't calculate a b if a<0 using pow() because pow() uses natural logarithms to calculate it (a b =e b ln a ) and since it's undefined for negative numbers it can't be calculated. I tried it and it works as long as b is an integer. I have searched through math.h and further files, but was unable to find how the function is defined and what it uses to calculate. I also tried searching the internet, but without any success. There are similar questions on Stack Overflow right here and here (for C#). (the last one is good, but I was unable to find sourcecode.) So the