I’m tinkering with a projecteuler problem and I encountered the following really odd behaviour. And I can’t for the life of me figure out whats going on.

As the screenshot shows. The condition evaluates to false, and the if-statment executed as if it was true.
I feel like I’m going crazy here.
Updated code: http://ideone.com/L7KMu
Edit: The actual values for next.x and next.y just prior to the condition are
0.324583, 9.97891
The are unchanged after the if statement.
Having compiled the code, it appears that the abs you are calling is not std::abs, overloaded for floating point, but integer abs. Try this amendment to the code:
You’ll notice that the cout line is printing different values for abs and std::abs.