If the number of decimal places is not greater than 4, OP might consider using the currency data type. Currencies are exact fixed-point numbers having four decimals after the dot so a value like 1.015 can be stored with perfect precision. Adding, subtracting and comparing currencies always gives an exact result. Internally, they are 64-bit signed integers with an implicit divisor of 10,000.
[edit]
functions like "power" return a double or extended. Prior to comparing the results of such functions, store them in currencies.