< Floating Point

Rounding

IEEE 754 specified four distinct rounding modes. We will talk about those modes, and their effects in this chapter. Also, rounding can play an important role in the accuracy of a floating-point computation, so we will discuss those effects here as well.

Rounding Modes

Rounding Errors

Relative Error

Relative error is one measure of error commonly used with floating point numbers. If is an approximation to , then the relative error, , is defined as

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.