Anda di halaman 1dari 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 ?

Anda mungkin juga menyukai