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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,1de1981df403322c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-07 08:36:59 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newsfeed.news2me.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail From: "Stephane Richard" Newsgroups: comp.lang.ada References: <1068220677.950551@master.nyc.kbcfp.com> Subject: Re: New limited range type? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Fri, 07 Nov 2003 16:36:58 GMT NNTP-Posting-Host: 141.149.81.135 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny01.gnilink.net 1068223018 141.149.81.135 (Fri, 07 Nov 2003 11:36:58 EST) NNTP-Posting-Date: Fri, 07 Nov 2003 11:36:58 EST Xref: archiver1.google.com comp.lang.ada:2214 Date: 2003-11-07T16:36:58+00:00 List-Id: I agree, if in this situation (B + C) saturates but B + (C - D) does not then it wouldn't saturate in the end result However B + C - D would saturate at the B + C part of the operation -- "To err is human. To really screw up, you need C++!" St�phane Richard "Ada World" Webmaster http://www.adaworld.com "Martin Dowie" wrote in message news:boggo8$3us$1@titan.btinternet.com... > "Hyman Rosen" wrote in message > news:1068220677.950551@master.nyc.kbcfp.com... > > Martin Dowie wrote: > > > I'd like to be able to declare integer/float/fixed/decimal types that > are > > > limited, at both ends, and never raise exceptions > > > > This is generally called saturating arithmetic, and you are > > far from the first to request it. > > Well, at least I'm not asking for anything _completely_ stupid then! :-) > > > > I belive the difficulty > > lies in assigning meaning to expressions and intermediate > > results. What if you say A := B + C - D, with values such > > that (B + C) saturates but B + (C - D) does not? > > Standard operator precedent rules should apply - I can't see > that as being outragous? > > > >