From: "Stephane Richard" <stephane.richard@verizon.net>
Subject: Re: New limited range type?
Date: Fri, 07 Nov 2003 16:36:58 GMT
Date: 2003-11-07T16:36:58+00:00 [thread overview]
Message-ID: <KSPqb.3251$y95.3116@nwrdny01.gnilink.net> (raw)
In-Reply-To: boggo8$3us$1@titan.btinternet.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
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" <martin.dowie@btopenworld.com> wrote in message
news:boggo8$3us$1@titan.btinternet.com...
> "Hyman Rosen" <hyrosen@mail.com> 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?
>
>
>
>
next prev parent reply other threads:[~2003-11-07 16:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-07 15:51 New limited range type? Martin Dowie
2003-11-07 15:57 ` Hyman Rosen
2003-11-07 16:20 ` Martin Dowie
2003-11-07 16:36 ` Stephane Richard [this message]
2003-11-07 16:59 ` Hyman Rosen
2003-11-07 18:18 ` Martin Dowie
2003-11-07 20:11 ` Larry Hazel
2003-11-07 22:40 ` Martin Dowie
2003-11-07 23:31 ` Larry Hazel
2003-11-12 8:22 ` Jean-Pierre Rosen
2003-11-12 15:00 ` Hyman Rosen
2003-11-12 15:34 ` Robert I. Eachus
2003-11-12 17:37 ` tmoran
2003-11-07 18:19 ` Mike Silva
2003-11-07 19:03 ` Marin David Condic
2003-11-07 18:05 ` Mike Silva
2003-11-08 21:58 ` Nick Roberts
2003-11-09 14:34 ` Martin Dowie
2003-11-11 5:13 ` Nick Roberts
2003-11-11 10:18 ` Martin Dowie
2003-11-11 10:35 ` Martin Dowie
2003-11-11 10:41 ` Lutz Donnerhacke
2003-11-11 12:37 ` Marin David Condic
2003-11-11 14:19 ` Martin Dowie
2003-11-11 12:34 ` Marin David Condic
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox