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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-30 20:13:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: Saturated Math Date: Fri, 30 May 2003 23:13:10 -0400 Organization: MindSpring Enterprises Message-ID: <3ED81DC6.704@noplace.com> References: <3ED7437E.5060607@noplace.com> NNTP-Posting-Host: d1.56.b6.95 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Server-Date: 31 May 2003 03:13:13 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:38169 Date: 2003-05-31T03:13:13+00:00 List-Id: Except that what I *want* is for saturation to occur on any exception relating to the number. I *don't* want the exception. It halts the code. That probably causes a reset of the processor. Billion dollar rockets exploding in the sky and all that. Investigators unamused by anectdotes about how wonderful exceptions are in theory. Corporate types wanting to know why you used Ada instead of C "just like everyone else..." I don't like having my day ruined like that. :-) The reason for wanting saturated math is because in an exceptional situation, the proper accommodation is NOT to raise an exception, but to saturate. We've done many analysese of these situations and determined that we'd prefer saturation instead of any other behavior because it is probably the least harmful thing to do. We already know how to write packages to do saturated math. The point is, we don't want to. It would be much more convenient to have this as a standard feature of Ada. (For that matter, I could do the whole job in assembly language, so why do I need Ada at all? :-) MDC tmoran@acm.org wrote: > questions. If you forget the function call, ie, X :=X+Y-Z; then > you raise an exception instead of saturating, so at least you know > there's a problem. -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "In general the art of government consists in taking as much money as possible from one class of citizens to give to the other." -- Voltaire ======================================================================