Floating Point Representation

Database
Enthusiast

Floating Point Representation

Are there any odds of using Float over Decimal? What are pros anc cons of using Float? Reading across some forums I came across some posts that discouraged the use of Float.Can anybody justify its usage?
1 REPLY
Teradata Employee

Re: Floating Point Representation

FLOAT has the advantage of being able to represent a very wide range of values; the disadvantage is that the precision is limited. Always consider FLOAT to be an approximation.

Approximation is typically fine when you are recording scientific measurements, calculating metrics based on ratios, etc. It's not good when you are dealing with money or counting discrete items (e.g. unit sales or inventory).