Date: 30/12/2010
Scientific and Statistical Computing
Assignment – I
- What is Error? Explain different types of errors.
- Write a program in C/C++ to calculate factorial of a given number using function.
- Write a program in C/C++ to calculate power of a given number using function.
- Write a program in C/C++ to calculate the following series.
ex = 1 + x/1! + x2/2! + … + xn/n!
- Given sin x = x – x3/3! + x5/5! + …. Write a program in C/C++ to calculate the truncation error in sin x if only first four terms are considered at x = 0.7. Also display relative error.
- What are the pitfalls in computing when number are expressed in normalized floating point mode? Illustrate your answer with example.
Submission Date: 10/01/2011