I am performing arithmetic subtraction on the elements of a C# list
of type double and it results in some incorrect results sometimes
For example I have three elements in the listTempStrike
as follows
3.6
3.7
3.8
So, when I perform listTempStrike[1] - listTempStrike[0]
it results 0.1
which is true but when I perform listTempStrike[2] - listTempStrike[1]
it returns 0.099999999999999645
which I feel is strange.
Any better solution to this?