Question: P4. Finish the python script pi.e.py, which contains several subproblems: (a) (15 points) Write a function to compute the following (truncated) continued fractions defined as

 P4. Finish the python script pi.e.py, which contains several subproblems: (a)

P4. Finish the python script pi.e.py, which contains several subproblems: (a) (15 points) Write a function to compute the following (truncated) continued fractions defined as (1) for any two input vectors a- ao, an] and b-[bo,. b+l] ao + a1 + b2 b3 + ant (b) (15 bonus points) One amazing formula of Ramanujan is (2). Find the smallest in- teger n that can make the sum in the left hand side to be equal to up to fifteen decimal digits. (For the double factorial part, you should import the code you wrote in double fact.py, use tol 10-16 and treat this part as accurate enough.) 1 + 1 + n+ 1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!