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,1de1981df403322c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-07 08:21:06 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: New limited range type? Date: Fri, 7 Nov 2003 16:20:24 +0000 (UTC) Organization: BT Openworld Message-ID: References: <1068220677.950551@master.nyc.kbcfp.com> NNTP-Posting-Host: host81-129-48-51.in-addr.btopenworld.com X-Trace: titan.btinternet.com 1068222024 4060 81.129.48.51 (7 Nov 2003 16:20:24 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Fri, 7 Nov 2003 16:20:24 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:2212 Date: 2003-11-07T16:20:24+00:00 List-Id: "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?