Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Simple continued fraction
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Best rational within an interval === A rational that falls within the interval {{open-open|''x'',β''y''}}, for {{math|0 < {{mvar|x}} < {{mvar|y}}}}, can be found with the continued fractions for {{mvar|x}} and {{mvar|y}}. When both {{mvar|x}} and {{mvar|y}} are irrational and :{{math|''x'' {{=}} [''a''{{sub|0}}; ''a''{{sub|1}}, ''a''{{sub|2}}, ..., ''a''{{sub|''k'' β 1}}, ''a''{{sub|''k''}}, ''a''{{sub|''k'' + 1}}, ...]}} :{{math|''y'' {{=}} [''a''{{sub|0}}; ''a''{{sub|1}}, ''a''{{sub|2}}, ..., ''a''{{sub|''k'' β 1}}, ''b''{{sub|''k''}}, ''b''{{sub|''k'' + 1}}, ...]}} where {{mvar|x}} and {{mvar|y}} have identical continued fraction expansions up through {{math|''a''<sub>''k''β1</sub>}}, a rational that falls within the interval {{open-open|''x'',β''y''}} is given by the finite continued fraction, :{{math|''z''(''x'',''y'') {{=}} [''a''{{sub|0}}; ''a''{{sub|1}}, ''a''{{sub|2}}, ..., ''a''{{sub|''k'' β 1}}, min(''a''{{sub|''k''}}, ''b''{{sub|''k''}}) + 1]}} This rational will be best in the sense that no other rational in {{open-open|''x'',β''y''}} will have a smaller numerator or a smaller denominator.<ref>{{cite web | last = Gosper | first = R. W. | author-link = Bill Gosper | title = Appendix 2: Continued Fraction Arithmetic | url = https://perl.plover.com/yak/cftalk/INFO/gosper.ps | year = 1977}} See "simplest intervening rational", pp. 29β31.</ref><ref>{{cite journal | last = Murakami | first = Hiroshi | date = February 2015 | doi = 10.1145/2733693.2733711 | issue = 3/4 | journal = ACM Communications in Computer Algebra | pages = 134β136 | title = Calculation of rational numbers in an interval whose denominator is the smallest by using FP interval arithmetic | volume = 48}}</ref> If {{mvar|x}} is rational, it will have ''two'' continued fraction representations that are ''finite'', {{math|''x''<sub>1</sub>}} and {{math|''x''<sub>2</sub>}}, and similarly a rational {{mvar|y}} will have two representations, {{math|''y''<sub>1</sub>}} and {{math|''y''<sub>2</sub>}}. The coefficients beyond the last in any of these representations should be interpreted as {{math|+β}}; and the best rational will be one of {{math|''z''(''x''<sub>1</sub>,β''y''<sub>1</sub>)}}, {{math|''z''(''x''<sub>1</sub>,β''y''<sub>2</sub>)}}, {{math|''z''(''x''<sub>2</sub>,β''y''<sub>1</sub>)}}, or {{math|''z''(''x''<sub>2</sub>,β''y''<sub>2</sub>)}}. For example, the decimal representation 3.1416 could be rounded from any number in the interval {{closed-open|3.14155,β3.14165}}. The continued fraction representations of 3.14155 and 3.14165 are :{{math|3.14155 {{=}} [3; 7, 15, 2, 7, 1, 4, 1, 1] {{=}} [3; 7, 15, 2, 7, 1, 4, 2]}} :{{math|3.14165 {{=}} [3; 7, 16, 1, 3, 4, 2, 3, 1] {{=}} [3; 7, 16, 1, 3, 4, 2, 4]}} and the best rational between these two is :{{math|[3; 7, 16] {{=}} {{sfrac|355|113}} {{=}} 3.1415929....}} Thus, {{sfrac|355|113}} is the best rational number corresponding to the rounded decimal number 3.1416, in the sense that no other rational number that would be rounded to 3.1416 will have a smaller numerator or a smaller denominator.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)