Damon,
REAL is a very limited data type. It is extremely susceptible to roundoff
errors. The value is stored in only 4 bytes, so you have only 6 digits of
precision. DOUBLE is far more accurate, because it uses 8 bytes for storage,
has 15 digits of precision, and therefore can be precise with numbers
billions of times larger than REAL can handle.

Bill

On Fri, May 15, 2009 at 4:05 PM, Gray, Damon <[email protected]> wrote:

>  Let’s suppose we have a table with a REAL and an INT, and let’s lay it
> out left to right as below:
>
>
>
> REAL1        INT1
>
> .0599        NULL
>
> .0600        NULL
>
> .0601        NULL
>
> .0698        NULL
>
> .0699        NULL
>
> .0700        NULL
>
> .0701        NULL
>
>
>
> Now, let’s use the update command to set INT1 to the value of REAL1 *
> 10000.  What would you expect?  Well, I expect something other than what I’m
> getting.  The results are as follows:
>
>
>
> REAL1        INT1
>
> .0599          599
>
> .0600          599
>
> .0601          601
>
> .0698          697
>
> .0699          698
>
> .0700          700
>
> .0701          701
>
>
>
> What gives??
>
>
>
>
>
>                wwwww
>
>                (   @  @   )
>
> -------oOO---(_)---OOo-------
>
>                 Damon J. Gray
>
> Anvil Corporation Business Services
>
>                    (360) 937-0770
>
>           oooo0  0oooo
>
>           (        )   (        )
>
> ----------\    (----)     /-----------
>
>                \__)   (__/
>
>
>

Reply via email to