COMPSCI 1JC3 Lecture Notes - Lecture 3: Single-Precision Floating-Point Format, Nan, Mim-104 Patriot
Document Summary
Rational numbers are represented in base 2. 0. 1 in base 10 also cannot be represented in base 2 with a finite number of digits. Adding 2 floating point numbers we will get a new number that may not be represented as a floating point. So we choose the floating point number closest to the true value. 0 and +0 may be returned if our result is too close to 0 (underflow) Infinity is returned if the result is too large to be represented (positive overflow) Infinity is returned if the result is too small to be represented (negative overflow) Nan stands for not a number and is returned if the result is y. Floating point arithmetic is approximation of using real numbers or rational numbers. 1. (1. 0e30 + (-1. 0e30)) + 1. 0: 1. 0e30 + (-1. 0e30 + 1. 0, 0. 0 and 0. 0, 0. 0 and 1. 0, 1. 0 and 0. 0, 1. 0 and 1. 0.