XL C/C++ for AIX, V12.1 compiler PTF (V12.1.0.3) exposes an issue with Boost Geometry Library

Fix readme


Abstract

An XL C/C++ for AIX, V12.1 compiler PTF (V12.1.0.3) header file change has exposed an issue with code in the Boost Geometry Library which improperly applies scaled-epsilon equality comparisons.

Content

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
into
(x1 * dy2) - x2 * dy1
then into
-((-(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.


Rate this page:

(0 users)Average rating

Document information


More support for:

XL C/C++ for AIX
Compiler

Software version:

12.1

Operating system(s):

AIX

Reference #:

1633166

Modified date:

2013-04-05

Translate my page

Machine Translation

Content navigation