From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,885dab3998d28a4 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Ariane 5 failure Date: 1996/10/15 Message-ID: #1/1 X-Deja-AN: 189625768 references: <96101416363982@psavax.pwfl.com> organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-10-15T00:00:00+00:00 List-Id: In article <96101416363982@psavax.pwfl.com> "Marin David Condic, 407.796.8997, M/S 731-93" writes: > In most of our work (control systems) it would be far more useful > for math over/underflows to saturate and continue on, rather than > raise an exception and halt processing. Ada never defined any > numeric types with this sort of behavior - and I find it difficult > to believe that many others in similar embedded applications > wouldn't also desire this behavior from some predefined floating, > fixed, and integer types. Of course, the language allows us to > define our own types and (if there's proper hardware and compiler > support for dealing with it) efficient "home-brew" solutions can > be built. Still, it would have seemed appropriate for the language > designers to have built some direct support for a very common > embedded need. They did. First look at 'Machine_Overflows. It is perfectly legal for even Float'Machine_Overflows to be false and the implementation to return, say IEEE nonsignaling NaNs in such a case. Also RM95 3.5.5(26) and 3.5.6(8) allow for nonstandard integer and real types respectively, and mention saturation types as one possible use for the feature. Talk to your vendor or check out what GNAT actually does on your hardware. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...