C# distinguishes real numbers, which come in two styles: floating point and decimal. Floating point is the most common and floating-point variables are assigned. This chart describes the two floating-point variables in C#:
Type | Size (bytes) | Range | Accuracy | In Use |
---|---|---|---|---|
float | 8 | 1.5 * 10-45 to 3.4 * 1038 | 6-7 digits | float f = 1.2F; |
double | 16 | 5.0 * 10-324 to 1.7*10308 | 15-16 digits | double d = 1.2; |
dummies
Source:http://www.dummies.com/how-to/content/c-2008-floating-point-variable-types.html
No comments:
Post a Comment