COMPSCI 1JC3 Lecture Notes - Lecture 3: Ariane 4, Single-Precision Floating-Point Format, Nan

41 views2 pages

Document Summary

Due to software error: 64 bit floating number was converted to 16 bit, was used for ariane 4. How can an infinite number system be represented on a computer: represent each member of the system using a fixed number of bits. Efficiency in use of space and time. Only finitely many members can be represented: represent each member of the system using an unbounded number of bits. Not efficient in use of space and time. Integers can be represented with a fixed number of bits. Signed magnitude approach: first bit is 0 for positive, 1 for negative, has the problem of 2 zeros, most computers actually use (cid:1006)"s (cid:272)o(cid:373)ple(cid:373)e(cid:374)t. Two"s (cid:272)o(cid:373)ple(cid:373)e(cid:374)t usi(cid:374)g (cid:1006)n bits: has one 0; 2n-1 -1 positives; 2n-1 negatives. Single precision floating numbers use 32 bits with 1 bit for the sign, 23 bits for the mantissa, and. For convenience, floating point numbers can be expressed in haskell in base 10: 23. 678, -0. 04, 59. 78e20, -59. 78e-20.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents