Saturday, December 22, 2012

Decimal , Float and Double Difference

What is the Difference between Decimal , Float and Double Values?


float 7 digits of precision
double has about 15 digits of precision
decimal has about 28 digits of precision
If you need better accuracy (eg: in accounting applications), use double instead of float. In modern CPUs both data types have almost the same performance. The only benifit of using float is they take up less space. Practically matters only if you have got many of them.

No comments:

Post a Comment

Comment Here..