XL C/C++ for AIX, V12.1 compiler PTF (V220.127.116.11) exposes an issue with Boost Geometry Library
An XL C/C++ for AIX, V12.1 compiler PTF (V18.104.22.168) header file change has exposed an issue with code in the Boost Geometry Library which improperly applies scaled-epsilon equality comparisons.
Consider the following calculation:
x1 * dy2 - x2 * dy1;
The pattern expects that both multiplies are subject to symmetric handling.
In the absence of options or pragmas it is not considered a bug for the compiler to turn expressions of the form
x1 * dy2 - x2 * dy1
(x1 * dy2) - x2 * dy1
-((-(x1 * dy2) + x2 * dy1) .
Doing that lets us use a separate multiply to first evaluate the
(x1 * dy2)
followed by a Negated Floating Multiply and Subtract instruction to do the rest, ie, two instructions instead of three, with in many cases increased accuracy.
So this is considered an invalid test case / usage error.
Clients requiring the Boost Geometry Library should build with compiler option -qfloat=nomaf to avoid the above transformation.