comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <nobody@noplace.com>
Subject: Re: New limited range type?
Date: Fri, 07 Nov 2003 19:03:48 GMT
Date: 2003-11-07T19:03:48+00:00	[thread overview]
Message-ID: <3FABEC8A.8020609@noplace.com> (raw)
In-Reply-To: 1068220677.950551@master.nyc.kbcfp.com

But that's just a matter of order of evaluation, which is well defined. 
You've got Left-To-Right without parens which implies one result and 
with parens, you have another result. Other equations have evaluation 
order dependencies - why not here?

More important is this: At present, what does it do with respect to 
raising an exception? With fixed precision on the RHS, it would raise an 
exception one way, but not another. Couldn't it saturate instead? With 
infinite precision on the RHS, what happens when you assign it to the 
LHS? Overflow/Exception? Why can't it saturate there? The saturation is 
primarily a benefit when it gets assigned to the LHS - not on the 
intermediate results. So long as you deal with that situation, you're 
all right.

MDC


Hyman Rosen wrote:
> 
> This is generally called saturating arithmetic, and you are
> far from the first to request it. 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?
> 


-- 
======================================================================
Marin David Condic
I work for: http://www.belcan.com/
My project is: http://www.jsf.mil/NSFrames.htm

Send Replies To: m   o   d   c @ a   m   o   g
                    c   n   i       c   .   r

     "So if I understand 'The Matrix Reloaded' correctly, the Matrix is
     basically a Microsoft operating system - it runs for a while and
     then crashes and reboots. By design, no less. Neo is just a
     memory leak that's too hard to fix, so they left him in... The
     users don't complain because they're packed in slush and kept
     sedated"

         --  Marin D. Condic
======================================================================




  parent reply	other threads:[~2003-11-07 19:03 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
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 [this message]
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