1 Attachment(s)
Relational and logical operator combination bug
I have written a simple program that approximates value of a Maclaurin series.
The source file is attached here because I could not make the wrap code feature work while posting.
I want to stop the while loop based on a test which goes something like this:
while( iterations < max iterations or aboslute_error < specified_error)
But the error comparison test never kicks in. However, when I remove the iterations test the error test works.
I know that it is something really fundamental that I have not taken into account. Do you think it is operator precedence that needs to be looked at ?
Can someone please point out what's going wrong?