{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 6 Notes

Check all possible denominators for q 1m at this q

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nds on point being evaluated) = O(y^(N+1)) 4 2/11/14 Things fall apart outside (- 1,1) Ra3onal Approxima3on y Ra3onal Approxima3on Early Work •  Ra3onal numbers can be wriJen as p/q, where p,q are integers •  Ra3onal Approxima3on –  Want ﬁnd to ﬁnd integer p* and q* such that –  As En - > 0, the approxima3on improves •  Why do this? –  Ra3onal numbers are nice J༄ –  Can represent p and q exactly for reasonable sized p and q •  i.e., don’t have to worry about machine precision n༆ n༆  n༆  π n༆  n༆  π* = 25/8 = 3.125 •  Archimedes, 250 BC •  Zu Chongzhi (Liu Hui), 480 AD π* = 355/113 = 3.141592920…. –  Used polygons, n=12,288 –  7- digits correct, remained unimproved for 800 years % Rational approximation of pi % Get max p and q from User M = input(‘Enter M: ’); π = 3.141592653589793… Approximate π as p/q where p and q are positive integers such that p≤M and q≤M Start with a straight forward solution: n༆  –  2- digits correct 223/71 < π < 22/7 –  3.1408… < π <...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online