My friend challenged me to make a calculator. I decided to make an exponent function, and it works fine except for when I enter a fraction. I'm using the pow() function which is supposed to be able to take long doubles. I even tested it with constants on line 30 and it outputs the square root of 2, exactly as it should. But If I enter:
2^.5=
It gives me 1 which is what I would get as though 0.5 was truncated. What's going on here?