This preview shows page 1. Sign up to view the full content.
ECE 190 Midterm Exam 1 Spring 2011 Monday, February 14, 2011 In this assignment, you will need to write a program to compute the arcsine function using the Newton-Raphson method. Arcsine takes as input a number between -1 and 1 and returns a number between − ! ! and ! ! such that the sine of the arcsine of x is x ; in other words, arcsine is the functional inverse of sine. To find arcsine of y , we will find a root of ! ! = sin ( ! ) − ! ; that is, we will find a point at which sin ( ! ) − ! = 0 . You MUST use this approach. We start with a guess ! ! and iterate such that new guess is ! ! ! ! = ! ! − ! ( ! ! ) ! ! ( ! ! ) Remember that ! ! ! = sin ( ! ! ) − ! and ! ! ! ! = cos ( ! ! ) . Your program must start by reading two floating point numbers from the user. The first input will be y and the second input will be your initial guess for ! ! . After each iteration, you should print " Next iteration: " followed by the new value of ! !
This is the end of the preview. Sign up to access the rest of the document.
This note was uploaded on 03/08/2012 for the course ECE 190 taught by Professor Hutchinson during the Spring '08 term at University of Illinois, Urbana Champaign.
- Spring '08