CE 311K Lab3 - CE311K Lab Assignment 3 Name: Margaret...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CE311K Lab Assignment 3 Name: Margaret Thompson Section:14885 1. Open the file variables.f90. Read the code and understand. Compile the program and execute it. Your output should look like: Explain why the output of the operation 3 using different variables (Real, integer, double without D0, double with D0). Which one those are inaccurate. Repeat for the case of 1.11 When 3 is displayed as an integer, it is inaccurate because it ignores the fractional proportion and doesn’t round. When you have a double precision number but it’s inactive, your number is accurate only up to the same # of significant digits in the Real answer. So it’s only accurate up to the 8 th digit. When 1.11 is displayed as an integer, it happens to be the same as if it were rounded to the nearest whole number even though the fractional proportion is ignored. 1.11 as an inactive double precision is only accurate up to the 3 rd digit because the Real number only has 3 digits. 2. Round-off errors We will calculate 1.0000001 200 in this problem. Run the program with a=1.000001 After executing this program, you will see two columns. The first column, represents the calculation of 1.0000001 200 as a ... a a a a n × × × × = n=200 multiplications
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/17/2008 for the course CE 311K taught by Professor Liljestrand during the Spring '08 term at University of Texas at Austin.

Page1 / 3

CE 311K Lab3 - CE311K Lab Assignment 3 Name: Margaret...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online