Hi,
There is a big problem in how all Microsoft products handles substractions. When you subtract two values the outcome is wrong.
This problem is found in VB6, .NET2001 and VS2005 as well in Excel.
Try this in Excel:
=79,8-84,2 and =79,7-84,1 both should give -4,4 but they give -4,40000000000001 and -4,39999999999999 (in Excel you must show all decimals otherwise it will round and it looks well)
In .NET this gives a problem when you compare the values with each other, they are NOT equal and they should be!.
This happens in many different cases! so be aware!!
Fred
There is a big problem in how all Microsoft products handles substractions. When you subtract two values the outcome is wrong.
This problem is found in VB6, .NET2001 and VS2005 as well in Excel.
Try this in Excel:
=79,8-84,2 and =79,7-84,1 both should give -4,4 but they give -4,40000000000001 and -4,39999999999999 (in Excel you must show all decimals otherwise it will round and it looks well)
In .NET this gives a problem when you compare the values with each other, they are NOT equal and they should be!.
This happens in many different cases! so be aware!!
Fred