CS 370- Final Exam Guide - Comprehensive Notes for the exam ( 148 pages long!)

403 views148 pages

Document Summary

Goal: to see that computation on a computer can be inaccurate, even if the math is correct. This is tough to do, except for this trick . Create a matlab script (text file with extension . m). % try alpha values of 0. 5 and 2. alpha = 0. 5; I = log((1+alpha) / alpha); for n = 1:n. I = 1/n - alpha * i; end disp(["answer: " num2str(i)]); Note: arithmetic on a computer uses truncated numbers. Thus, we can have a small error in every number. So there seems to be a build-up of round-off errors, but only when. Suppose we use only 5 digits of accuracy. It"s not just what you compute, but how you compute it. We follow some basic rules when doing arithmetic and mathematics. Once you do arithmetic using floating-point numbers, none of the above are true. Goal: to learn how computers represent real numbers. A computer has two basic strategies for representing numbers:

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

Related Documents