sum of double values not the same after re-fetch from dbase 
Author Message
 sum of double values not the same after re-fetch from dbase

Hello.

Using MSVC 4.1 on NT and MS SQLServer 6.0, we are experiencing the
following problem with the summing of double
values.

double variable adSum is a sum of n double values.  It has to be compared
to adLimitSum, which is another double value.

After the individual values which sum up to adSum are saved to the database
and retrieved, the newly calculated adSum value is slightly greater than it
was before the save.  Hence, the comparison fails.

We need to come up with some tolerance value within which the sum should
be.  Using the above compiler and database, how should this tolerance be
defined?  It probably will need to take into account the value of n.

Any help would be appreciated.  Please e-mail a copy of the response to:


Ahsan ul Haque
MCM, Inc.



Mon, 25 Oct 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. sum of double values not same after re-fetch from database

2. ~Sum existing values with values from another table

3. double not assigning value

4. addition long values to long double value ?

5. Comparing double NAN with double INF is not IEEE compliant

6. dbase 4 to dbase 3 conversion

7. Not All Control Paths Return A Value/ Everything Is Not Valid

8. Sorting on double values.

9. question about huge double value

10. Largest double value ...

11. Convert a string to a double value ?

12. value of : (double) clock( ) / CLOCKS_PER_SEC

 

 
Powered by phpBB® Forum Software