5.8 Types of Floats

I l @ ve RuBoard

The float type also comes in various flavors. float denotes normal precision (usually 4 bytes). double indicates double precision (usually 8 bytes), giving the programmer twice the range and precision of single-precision ( float ) variables .

The quantifier long double denotes extended precision. On some systems this is the same as double ; on others, it offers additional precision. All types of floating-point numbers are always signed.

On most machines, single-precision floating-point instructions execute faster (but less accurately) than double precision. Double precision gains accuracy at the expense of time and storage. In most cases float is adequate; however, if accuracy is a problem, switch to double (see Chapter 19).

I l @ ve RuBoard


Practical C++ Programming
Practical C Programming, 3rd Edition
ISBN: 1565923065
EAN: 2147483647
Year: 2003
Pages: 364

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net