Double, Float, and Real all perform similar mathematics, it's just that the underlying data type is different. Double and Float deal with binary objects (probably using IEEE754 compliant hardware. Check the spec. Even if your hardware different it will give you a great insight into these data types.) Real used a form of packed or BCD data.

What these data types do is give you a fixed number of digits of precision (according to the datatype), but allow you to move these digits relative to the decimal point. That's a bit confusing, huh?

Arguably, an integer is 32 bits. The maximum value is about 2 billion, which is 10 digits. Floating point (real) data types let you move the decimal point with respect to those ten digits. Even many dozens of places away.

The maximum value for a float is about 7.2E+75. That's 7 followed by 75 zeroes.

Adding .0000000000000000000000000

But adding .0000000000000000000000000

You can define the number of digits to the left AND right of the decimal place. Just keep in mind that DB2 (and any other engine) is limited in the number of digits for which the mathematics remains precise.

Good Luck,

Kent