Re: Classic RW
From: Chuck Stevens (charles.stevens_at_unisys.com)
Date: 09/01/04
- Next message: Chuck Stevens: "Re: Classic RW (was: Rounding errors"
- Previous message: Chuck Stevens: "Re: Classic RW"
- In reply to: Robert Wagner: "Re: Classic RW"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 1 Sep 2004 10:20:40 -0700
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:iedbj091rf52f4jrjlatjjlo4tltoo2jgm@4ax.com...
> On Tue, 31 Aug 2004 11:23:44 -0700, "Chuck Stevens"
> <charles.stevens@unisys.com> wrote:
>
> >I know environments in which integers, fixed-point and floating-point
data
> >items are "stored in memory" identically; the only differentiation among
> >them is how they are handled and treated. In that environment, in fact,
> >there is no requirement that integer data actually *be* in "canonic
integer
> >form"; a normalized floating-point representation of the value serves
> >equally well and is just as exact a representation. Thus, in that
> >environment, a fixed-point numeric value may be stored, *not* as an
integer
> >defined for that implementation, but as a *floating-point* item that
happens
> >to have an exact value.
>
> That seems dangerous. If the program subtracts a small number from a
> large number, the hardware might lose decimals. The result would be
> the original large number, as though zero had been subtracted.
Depends on what you mean by "large" and "small". If the *values* are
*representable* as single-precision integers (magnitude no greater than
549,755,813,887) the subtraction produces exact results. Likewise, if the
values are contained in double-word operands, and are *representable* as
double-precision integers (magnitude no greater than
302,231,454,903,657,293,676,543), the subtraction will produce exact
results. It does not matter in either case whether the operands or the
results are integerized, normalized, or any of the various possible (exact)
representations in between.
-Chuck Stevens
- Next message: Chuck Stevens: "Re: Classic RW (was: Rounding errors"
- Previous message: Chuck Stevens: "Re: Classic RW"
- In reply to: Robert Wagner: "Re: Classic RW"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|