This is the mail archive of the gcc@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: real.c fails floating point tests


> Decimal <-> binary conversion is the most important floating point
> operation for the compiler, since there is no portable alternative but
> to write decimal numbers (the ugly C99 hexadecimal input will become
> generally available only in the distant future) and hope that they
> will be converted with sufficient accuracy into binary machine
> numbers.  I have reported some errors for this in the current GCC, and
> have also noticed that the decimal conversion method suffers from
> double-rounding error (test case to follow later).

Wouldn't it always be better to write out floating-point constants in
hex in the assembler file. You definitely cannot trust assemblers to
be absolute accuracy (absolute accuracy in such conversions is required
in Ada, and desirable in other languages).


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