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: "Marin David Condic, 561.796.8997, M/S 731-93" Subject: Re: Ariane 5 failure Date: 1996/10/28 Message-ID: <96102813151485@psavax.pwfl.com>#1/1 X-Deja-AN: 193023775 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU x-vms-to: SMTP%"INFO-ADA@VM1.NODAK.EDU" newsgroups: comp.lang.ada x-vms-cc: CONDIC Date: 1996-10-28T00:00:00+00:00 List-Id: robin writes: >---The issue was not the addition of a new exception handler. >The issue was that a magnitude check should have been >performed on a conversion from double precision floating >point to 16-bit integer, but it wasn't. >Of course, having an exceptin handler for this specific purpose >would have helped, and should have been included as a fallback. > > >Assuming that a new exception _handler_ had been added, then it _might >made > >a difference. > >You can be absolutely certain that it would have helped. > procedure ARIANE_FIVE_OPERATION is X : FLOAT range -65536.0..65535.0 := 65535.0 ; Y : INTEGER range -32768..32767 := 0 ; begin if (X not in -32768.0..32767.0) then SHUT_DOWN_THE_CHANNEL_AND_PASS_CONTROL_TO_THE_OTHER_SIDE ; --Boom! else Y := INTEGER (X) ; end if ; end ARIANE_FIVE_OPERATION ; *Absolutely* certain? Seems that the above algorithm *DOES* have runtime checks to constrain the assignment of a float to an integer, yet the accommodation is still a *BAD* engineering decision. We can polish and polish and polish the software all we want and perform all sorts of runtime checks, but if the accommodation remains wrong, we're polishing a turd. MDC Marin David Condic, Senior Computer Engineer ATT: 561.796.8997 M/S 731-96 Technet: 796.8997 Pratt & Whitney, GESP Fax: 561.796.4669 P.O. Box 109600 Internet: CONDICMA@PWFL.COM West Palm Beach, FL 33410-9600 Internet: CONDIC@FLINET.COM =============================================================================== "If you don't say anything, you won't be called on to repeat it." -- Calvin Coolidge ===============================================================================