I have a lot of data in Science notation when I load this data into my double variable, everything works fine (in VS I see value 0.00000000022). But when I multiply this number by 1000000 I got unrounded value (0.00021999999999999998).
I must multiply this value because I use it for selection filter. After send data from selection filter I again divide this data to my raw format 0.00021999999999999998 / 1000000 = 0.00000000022.
2.20E-10 = 0.00000000022 * 1000000 = 0.00021999999999999998
Expected value is this:
0.00021999999999999998 => 0.00022
When I use a similar number, for example, 2.70E-10 I got after multiple value 0.00027 (In this case conversion work fine).
Values are converted only for use in the selection menu so that no unnecessary zeros are shown and the label indicates which unit they represent. (For this example from Ohm to microOhm in select box)
Is there any way to correctly convert these values?
I use LINQ for convert this values in like this:
var x = y.Select(s => s.Resistance * 1000000).Distinct();