Re: PHP floating point bug possibly misinterpreted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 13, 2011 at 01:24:08PM -0600, Michael Cronenworth wrote:
> I feel I should bring attention to a PHP developer response[2] to this 
> bug. Warning: There is a bit of emotion inside. They feel it is a gcc 
> bug in FP handling, which seems (in my limited knowledge) to be 
> accurate. The gcc fix was provided, not by changing default behavior, 
> but by a compiler flag "-fexcess-precision=standard". Since this is a 
> gcc bug (I believe bug is the right term) this could affect any gcc 
> compiled code for the x86 arch that uses FP. Should the default gcc 
> compiler flag set include the new flag?

I don't think so. Code that needs it should use the flag, or the -std=c99 if
that's applicable.

>From the gcc man page:

       -fexcess-precision=style

           This option allows further control over excess precision on
           machines where floating-point registers have more precision than
           the IEEE "float" and "double" types and the processor does not
           support operations rounding to those types. By default,
           -fexcess-precision=fast is in effect; this means that operations
           are carried out in the precision of the registers and that it is
           unpredictable when rounding to the types specified in the source
           code takes place. When compiling C, if
           -fexcess-precision=standard is specified then excess precision
           will follow the rules specified in ISO C99; in particular, both
           casts and assignments cause values to be rounded to their
           semantic types (whereas -ffloat-store only affects assignments).
           This option is enabled by default for C if a strict conformance
           option such as -std=c99 is used.



-- 
Matthew Miller <mattdm@xxxxxxxxxx>
Senior Systems Architect -- Instructional & Research Computing Services
Harvard School of Engineering & Applied Sciences
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux