C# Floating Point Variable Types

C# floating point variables come in two types: float and double. The following table compares these two types in terms of size, range, and accuracy.
























TypeSize (bytes)RangeAccuracyIn Use
float81.5 x 10–45 to 3.4 x 10386–7 digitsfloat f = 1.2F;
double165.0 x 10–324 to 1.7 x 1030815–16 digitsdouble d = 1.2;








dummies

Source:http://www.dummies.com/how-to/content/c-floating-point-variable-types.html

No comments:

Post a Comment