Autumn Offers - hours only!Up to 80% off on all courses and bundles.-Close
Review
So you think you can count?
Rounding functions and more
Review and practice

Instruction

Oops... Something went wrong. Why did we get such an odd result?

The weight and height columns have a real data type, which is a floating point number. The internal representation is binary arithmetic, which means not all decimals can be represented precisely. Therefore, any computations are not performed exactly, as we can see.

What can be done about it? Nothing! That's the way binary arithmetic works.

If you need exact computations, use decimal, numeric and money (for currency) data types. When dealing with money values, always use decimal, numeric or money data types. Floating point numbers are for "scientific" computations on various measurements, like weight and height.

Exercise

Click Next exercise to continue.