Floating Types

The floating types represent approximations of real values. Many important details of floating types are left up to the implementation, such as range, accuracy, the signedness of zero, the presence of infinity, and so on. This can make it difficult to write portable programs, although the float.h header file exposes several macros that can give a program more information about how floating point arithmetic is actually implemented on a given system.

Floating-point arithmetic is an advanced programming concept that demands a solid grasp of both the mathematical framework governing floating-point numbers and the specific floating point environment of a target system. Additionally, floating-point arithmetic is avoided in operating systems due to its performance impacts and lack of portability–if it is even available–across a variety of architectures. As a result, this topic will not be covered further in this course.

Further Reading