December 2013
Beginner
576 pages
16h 4m
English
You can use a variable declared to be of type float to store values containing decimal digits. A floating-point constant is distinguished by the presence of a decimal point. The values 3., 125.8, and -.0001 are all valid examples of floating-point constants. To display a floating-point value, the NSLog conversion characters %f or %g can be used.
Floating-point constants can also be expressed in so-called scientific notation. The value 1.7e4 is a floating-point value expressed in this notation that represents the value 1.7 x 104.
As noted, the double type is the same as type float, only with roughly twice the range.
Read now
Unlock full access