Rounding errors occur when a numerical calculation requires that a number be rounded or trimmed to a certain number of digits.

#### Truncation

errors, on the other hand, arise when an infinite process is replaced by a finite one. For example, if you use a Reimann sum of two segments on the left with the same width of segments, the truncation error is the error caused by the approximation of a mathematical process. This is because choosing a finite number of rectangles instead of an infinite number of them results in a truncation error in the mathematical process of integration.It is important to note that, while it is sometimes mistakenly referred to as such, the rounding error (the consequence of using finite-precision floating-point numbers in computers) is not actually a truncation error. This is because rounding errors are caused by rounding numbers, rather than cutting them.