The decimal data type can store a maximum of 38 digits, all of which can be to the right of the decimal point. The decimal data type stores an exact representation of the number; there is no approximation of the stored value.
...
The float and real data types are known as approximate data types.
...
do not use these data types when exact numeric behavior is required, such as in financial applications, in operations involving rounding, or in equality checks.
...
Avoid using float or real columns in WHERE clause search conditions, especially the = and <> operators. It is best to limit float and real columns to > or < comparisons.