This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Ada front-end depends on signed overflow
- From: Paul Schlie <schlie at comcast dot net>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: Robert Dewar <dewar at adacore dot com>,Florian Weimer <fw at deneb dot enyo dot de>,Andrew Pinski <pinskia at physics dot uc dot edu>,GCC List <gcc at gcc dot gnu dot org>,<bosch at gnat dot com>
- Date: Wed, 08 Jun 2005 13:12:49 -0400
- Subject: Re: Ada front-end depends on signed overflow
> From: Joe Buck <Joe.Buck@synopsys.COM>
>> On Wed, Jun 08, 2005 at 10:53:04AM -0400, Paul Schlie wrote:
>>> From: Robert Dewar <dewar@adacore.com>
>>> There is nothing imprecise about IEEE floating-point operations
>>
>> - agreed, however nor is it mandated by most language specifications,
>> so seemingly irrelevant.
>
> In real life, there are no longer any significant non-embedded
> architectures out there that don't use IEEE floating point, so
> it is a widely used practice to assume it and document the requirement.
> The resulting programs might not work on a Vax, Cray, or IBM 370.
> C'est la vie.
- With the not so minor exception that IEEE strict semantics are basically
counter productive for most real-time fp signal processing tasks, as
simple saturation and consistent reciprocal semantics tend to be preferred
as they lose precision gracefully, not catastrophically as sticky inf and
nan semantics do at the limits of it's representation bounds; which is why
fp signal processor architectures tend not to implement IEEE semantics,
and arguably rely on it's "imprecision" in lieu of failure at it's bounds.
(also most "embedded" processors do not have any FP support, and often
typically benefit from looser soft implementations of IEEE, as strict
bit-exact behavior is typically of less significance when all that may
be occasionally required is just a bit more dynamic range than an fixed
point representation my reasonably provide, and often gladly trade a few
bits of precision for a less bulky implementations and never need to fool
with nan or inf semantics).