------------------------------------------------------------------------------------------- EXQ1: Numerical Methods 2014/2015 - Example Tripos Question. Time allowed 30 minutes. a) Sketch code for an ASCII to integer base conversion function for base 10 (decimal) with the additional feature that any numbers starting with a leading zero are handled in base 8 (octal). [4 Marks] b) Sketch code for the multiplication of fixed-point, signed numbers that use 16 bits where the unit in the last place (ULP) is equal to 1/256. Explain your encoding of polarity (the sign bit) and justify your decision. [6 Marks] c) One means for finding a value for Pi/4 is to compute sufficient terms of the following expansion: arctan x = x - x^3/3 + x^5/5 - x^7/7 + ... i) Sketch the required code. Note, x will not need to appear in your code. [3 Marks ] ii) Approximately how many terms will you need to sum for an answer accurate to one part per million? Will underflow potentially affect your result ? How can this be minimised? [5 Marks ] d) Briefly compare the technique in part c) for finding a value of Pi with Monte Carlo dart throwing and with potentially better ways. [2 Marks] ------------------------------------------------------------------------------------------- END