I'm using SQL Server and in one of the tables I have a nullable float column. When I look at that value in Microsoft SQL Server Management Studio I have a value in one of the records as 1.3. I also have a client app that gets data from the database via Entity Framework (EF) and it has a corresponding nullable double (double?) property for that column. Now when I get a value from the database it has 1.2999999523162842 values in it.
All these records (more than 1 million) will be used in interpolation, extrapolation, calculation and any smallest deviation becomes a significant value. So all values on the client side have to match values in the database.
I can't round on the client side to the first decimal number, because in the database there are values with 2, 3, 4, or more decimal points.
My question is how can I make sure that all values in the database will be the same values on the client after loading them from database via EF?