This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Effects of newly introduced -mpcX 80387 precision flag


Hello!

> +Setting the rounding of floating-point operations to less than the default
> +80 bits can speed some programs by 2% or more. Note that some mathematical
> +libraries assume that extended precision (80 bit) floating-point operations
> +are enabled by default; routines in such libraries could suffer significant
> +loss of accuracy, typically through so-called "catastrophic cancellation",
> +when this option is used to set the precision to less than extended precision.


Perhaps it should be noted that these libraries are specific to x86
processors, since other processors don't have extended precision.
But... this is under x86 Options section.
Also, some libraries (e.g. libxslt) assume double precision to be the
default and can return incorrect results in extended precision.
I'm not familiar with libxslt, but if it expects double precision, it should set x87 precision bits by itself. The executable starts in extended mode in linux.

Uros.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]