In our code we are using double everywhere basically when we receive this value from json response or sending this value back again its in double datatype
The issue we found is when we assign 2.9 value to a double variable. It assigns it as 2.899999 and this is the value which is being in used in amount calculation everywhere. Due this sometimes it throws a cent off
Any idea how to solve this and whats the best practice generally being used in the industry ?