COMPSCI 1JC3 Lecture Notes - Lecture 3: Single-Precision Floating-Point Format, Nan, Mim-104 Patriot

27 views2 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents