double vs float in c#

double vs float in c#

Difference between decimal, float and double in .NET?

Main difference.

Float - 7 digits (32 bit)

Double-15-16 digits (64 bit)

Decimal -28-29 significant digits (128 bit)



It is used mostly in graphic libraries because very high demands for processing powers, also used situations that can endure rounding errors.



In case of financial applications it is better to use Decimal types because it gives you a high level of accuracy and easy to avoid rounding errors



Double Types are probably the most normally used data type for real values, except handling money.