0% found this document useful (0 votes)
286 views

MACM316 Computing Assignment 1

This one page document outlines Computing Assignment 1 which is due on May 26th at 11pm. Students must submit both MATLAB code and a one page report. The assignment involves investigating the output of a floating point arithmetic computation for varying values of n and x between 0 and 5. The report should include (a) plots of output vs x for different n, (b) the smallest n where results differ from exact arithmetic, (c) limiting behavior for large n, and (d) why floating point leads to the results. Partial MATLAB code is provided to use as a starting point.

Uploaded by

nguyentudat1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
286 views

MACM316 Computing Assignment 1

This one page document outlines Computing Assignment 1 which is due on May 26th at 11pm. Students must submit both MATLAB code and a one page report. The assignment involves investigating the output of a floating point arithmetic computation for varying values of n and x between 0 and 5. The report should include (a) plots of output vs x for different n, (b) the smallest n where results differ from exact arithmetic, (c) limiting behavior for large n, and (d) why floating point leads to the results. Partial MATLAB code is provided to use as a starting point.

Uploaded by

nguyentudat1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

MACM 316 Computing Assignment 1

Due Date: May 26, at 11pm.


You must upload both your code to Computing Assignment 1-scripts and your report to
Computing Assignment 1. The assignment is due at 11:00pm. I have set the due time in
Canvas to 11:05pm and if Canvas indicates that you submitted late, you will be given 0 on the
assignment. Your computing report must be exactly 1 page. There will be a penalty given if your
report is longer than one page.

Please read the Guidelines for Assignments first.


Keep in mind that Canvas discussions are open forums.
Acknowledge any collaborations and assistance from colleagues/TAs/instructor.

Computing Assignment Floating Point Arithmetic

Required submission: 1 page PDF document and Matlab scripts uploaded to Canvas.

Let x 0 be an arbitrary number and n a nonnegative integer. In exact arithmetic, the following
computation leaves x unchanged:

1 for i=1:n
2 x=nthroot(x,2);
3 end
4
5 for i=1:n
6 x=x2;
7 end

However, in finite-precision arithmetic the results may be dramatically different for large n. The
purpose of this assignment is to investigate the output of this computation in Matlab for various
values of n and for x in the range 0 x 5.

Your conclusions should be explained in a one-page report. Your report must include the following:

(a) Representative plots of the output as a function of x, with each plot corresponding to a
different value of n.
(b) A discussion of the smallest value of n after which the result of the finite-precision computation
begins to differ from exact arithmetic computation.
(c) A discussion of the limiting behaviour for large n.
(d) A brief explanation as to why computing in floating point arithmetic leads to the results you
have found.

Partial code for this assignment can be found in the file FloatPt.m on Canvas. I suggest using this
as your starting point. If you have questions about Matlab or other aspects of the assignment or
course, then I strongly encourage you to attend the tutorials and drop-in workshops.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy