1 / 7

CIS541 – Lab1 Analysis

CIS541 – Lab1 Analysis. Roger Crawfis. Computers Do As They’re Told. Garbage in Garbage out Most of life’s problems emanate from an underlying communication problem. No different with computers: You thought you told the computer to do one thing. It did another.

rosakrueger
Download Presentation

CIS541 – Lab1 Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS541 – Lab1 Analysis Roger Crawfis

  2. Computers Do As They’re Told • Garbage in Garbage out • Most of life’s problems emanate from an underlying communication problem. • No different with computers: • You thought you told the computer to do one thing. It did another. • You thought the input or intended use of your system was A. It was given B. OSU/CIS 541

  3. Lab1 Results • Results were identical to digits shown for Taylor series and sin(x). Results for different step sizes. ??? OSU/CIS 541

  4. Lab1 Results • Why was the value of x equal to –0.1 at the end of the loop? • 32-bit floating point accuracy • x = -0.1 + 0.00000001  -0.1 • The value of sin(-0.1) = -0.09983342, why wasn’t the result equal to this value as well? OSU/CIS 541

  5. Forcing Floating-Point Arithmetic • Do you believe the other numbers generated by your program? • What is the difference between these two statements? • Sum += x; // one term of the Taylor Series • Sum += x*(1-x*x*( 1 / (3*2*1) ) ); // two terms of the Taylor Series Absolutely nothing!!! OSU/CIS 541

  6. Lab1 – Lessons Learned • More work is not necessarily better. • Do not trust the answers blindly. See if they make sense. • Computer precision is limited. • Round-off errors actually do happen. • Sleep is for weenies ! • … OSU/CIS 541

  7. Lessons Learned Computers have limited capabilities!!! OSU/CIS 541

More Related