Single Status Update
This code is supposed to calculate e to the power x. It works fine at lower numbers, but then at x = 3.6, the output starts to decrease as x goes up. What's wrong?
EDIT: The problem was that "factorial" function was an int, so at high values, it won't work.
- Show previous comments 3 more
When you ask a question like this and then notice your own mistake, it can make you feel embarassed, especially if it's something that seems totally obvious now that you've spotted it. Naturally, you don't want other people to laugh at you so you hide the evidence of your stupidity. I can understand that even though Phml is probably right.
- Show next comments 3 more