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

Assignment 1 of Numerical Method

The document provides instructions for a numerical methods assignment with 5 exercises: 1) Rewrite polynomials in nested form and evaluate with and without nesting at x=1, calculating operations. 2) Find binary representations of decimal numbers. 3) Convert base 2 numbers to decimal. 4) Convert base 10 numbers to binary floating point format using IEEE754 double precision. 5) Calculate relative rounding errors for results in Exercise 4 and compare to mach epsilon.

Uploaded by

TianyuLiu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Assignment 1 of Numerical Method

The document provides instructions for a numerical methods assignment with 5 exercises: 1) Rewrite polynomials in nested form and evaluate with and without nesting at x=1, calculating operations. 2) Find binary representations of decimal numbers. 3) Convert base 2 numbers to decimal. 4) Convert base 10 numbers to binary floating point format using IEEE754 double precision. 5) Calculate relative rounding errors for results in Exercise 4 and compare to mach epsilon.

Uploaded by

TianyuLiu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CS3113 Numerical Methods

Assignment 1
Remember to include all sub steps to show your work. Not doing so will result in a penalty!

1
Rewrite the following polynomials in nested form. Evaluate with and without nested for at x =
many operations are needed (operations = additions + multiplications)?

1
3.

How

(a) P (x) = 4x4 + 2x3 + x2 + 4x + 1


(b) P (x) = 6x4 + 2x3 + 9x2 3x + 4
(c) P (x) = 3x4 + x3 x2 + 1

2
Find the binary representation for the following numbers:
6
7

(a) 227

(d)

(b) 17.5

(e) 3.2

(h) 99.9

(f) 11.25

(i) 0.1

(c)

2
3

(g) 30.6

3
Convert the following base 2 numbers to decimal:
(a) 101010

(c) 10101.01

(e) 11011.10101

(b) 1011.1011

(d) 111.001

(f) 1111.010001

4
Convert the following base 10 numbers to binary and express each as a floating point number fl(x) (IEEE754
double precision.). Use the Rounding to Nearest Rule.
(a)

1
3

(b) 100.2

(c)

44
7

(e) 2.7

(d) 2.75

(f)

10
3

5
What is the relative rounding error ( |lf (x)x|
) of your results in Exercise 4? Is it smaller than
x

mach
2 ?

You might also like