All Forums Database
leo.issac 184 posts Joined 07/06
11 Dec 2006
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?

Fred 1096 posts Joined 08/04
11 Dec 2006

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).

You must sign in to leave a comment.