🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1376

Re: Questions about NCEG

#1376
From: Doug Gwyn
Date: Sun, 03 Jun 1990 19:57
46 lines
3067 bytes
In article <8846@celit.fps.com> ps@fps.com (Patricia Shanahan) writes:
>The issue is even clearer for Fortran.

Thank heavens.

>Fortran users and implementers generally seem to take floating point types
>far more seriously than typical C users and implementers. If distinguishing
>-0.0 from 0.0 is such a good thing, why is it so expressly prohibited, not
>just in early Fortran standards, but in the draft for the next Fortran 
>standard?

I'm not sure I like this line of argumentation, even though it would
lead to a conclusion in line with mine.  Certainly there is no guarantee
that the best possible decisions would be made by the Fortran committee,
although this particular one does sound good to me.

One thing I would like to challenge in this thread is the assumption
that it is rational to specify conformance to IEEE 754 and/or 854.
If I had an engineer working for me and upon being requested to
design a portable format for floating-point representation he had
come back to me with a specification like IEEE 754, I would fire the
bastard on the grounds of professional incompetence.  Not only does
IEEE 754 fail in its primary goal of standardizing the format, but
it invents a multiplicity of variations plus a new fantasy world of
nonstandard mathematics, the latter solely for the reason that in
SOME artificially simple situations, lack of care on the part of
algorithm designers could be automatically compensated for by
carrying invalid arithmetic results as the IEEE 754 special values.
Catering to amateur sloppiness while making life more difficult for
the careful professional is inexcusable in a technical standard.
It is insane to insist on conformance to such an abomination.  At
best, it is a fact of life (especially in the small computer world)
that has to be somehow coped with, hopefully by the implementor of
one's programming language.

>Note that there is nothing about this that prevents a standard conforming
>Fortran implementation from being based on an IEEE floating point conforming
>platform. It just requires a little care on the part of the language 
>implementer to ensure that all zeros are equal to each other and are never
>printed with minus signs.

It is also probably advisable for implementors faced with 68881 etc.
FPUs to implement the programming language's negation operation by
loading a FP register with true_zero then subtracting the expression
to be negated from the register (leaving a sensible negative in the
register even when the expression happens to have zero value).
Technical Details
Message-ID: <13038@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!mips!apple!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
References: <1990May30.205436.11534@twinsun.com> <13028@smoke.BRL.MIL> <8846@celit.fps.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!mips!apple!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Questions about NCEG
Message-ID: <13038@smoke.BRL.MIL>
Date: 3 Jun 90 19:57:24 GMT
References: <1990May30.205436.11534@twinsun.com> <13028@smoke.BRL.MIL> <8846@celit.fps.com>
Organization: U.S. Army Ballistic Research Laboratory, APG, MD.
Lines: 46