1 |
{\rtf1\ansi \deff4\deflang1033{\fonttbl{\f0\froman\fcharset0\fprq2 Tms Rmn;}{\f1\froman\fcharset2\fprq2 Symbol;}{\f2\fswiss\fcharset0\fprq2 Helv;}{\f3\fmodern\fcharset0\fprq1 Courier;} |
2 |
{\f4\froman\fcharset0\fprq2 Times New Roman;}{\f5\fswiss\fcharset0\fprq2 Arial;}{\f6\froman\fcharset0\fprq2 MS Serif;}{\f7\fswiss\fcharset0\fprq2 MS Sans Serif;}{\f8\froman\fcharset0\fprq2 Times;}{\f9\fswiss\fcharset0\fprq2 Helvetica;} |
3 |
{\f10\fswiss\fcharset0\fprq2 System;}{\f11\fmodern\fcharset0\fprq1 Courier New;}{\f12\froman\fcharset0\fprq2 New York;}{\f13\fswiss\fcharset0\fprq2 Geneva;}{\f14\froman\fcharset0\fprq2 Americana;}{\f15\froman\fcharset0\fprq2 ACaslon Regular;} |
4 |
{\f16\froman\fcharset0\fprq2 BakerSignet;}{\f17\fnil\fcharset0\fprq2 Broadband ICG;}{\f18\froman\fcharset0\fprq2 Birch;}{\f19\fnil\fcharset0\fprq2 Bodoni Highlight ICG;}{\f20\froman\fcharset0\fprq2 Cooper Black;}{\f21\fnil\fcharset0\fprq2 Choc ICG;} |
5 |
{\f22\fswiss\fcharset0\fprq2 Copperplate32bc;}{\f23\froman\fcharset0\fprq2 Charlemagne;}{\f24\froman\fcharset0\fprq2 Cottonwood;}{\f25\fswiss\fcharset0\fprq2 BellGothic Black;}{\f26\fswiss\fcharset0\fprq2 BellGothic;} |
6 |
{\f27\fnil\fcharset0\fprq2 East Bloc ICG Closed Alt;}{\f28\fswiss\fcharset0\fprq2 Franklin Gothic Condensed;}{\f29\fswiss\fcharset0\fprq2 Franklin Gothic No.2;}{\f30\froman\fcharset0\fprq2 AGaramond Bold;}{\f31\froman\fcharset0\fprq2 AGaramond;} |
7 |
{\f32\froman\fcharset0\fprq2 Goudy Heavyface;}{\f33\froman\fcharset0\fprq2 Goudy;}{\f34\fswiss\fcharset0\fprq2 Hobo;}{\f35\fnil\fcharset0\fprq2 Jazz Poster ICG;}{\f36\froman\fcharset0\fprq2 Juniper;}{\f37\fswiss\fcharset0\fprq2 Kaufmann;} |
8 |
{\f38\fnil\fcharset0\fprq2 Mini Pics Borderline Cutout;}{\f39\fnil\fcharset0\fprq2 Mini Pics Digidings;}{\f40\fnil\fcharset0\fprq2 Mini Pics Head Buddies;}{\f41\fnil\fcharset0\fprq2 Mini Pics Lil Ancients;}{\f42\fnil\fcharset0\fprq2 Mini Pics Lil Dinos;} |
9 |
{\f43\fnil\fcharset0\fprq2 Mini Pics Lil Fishies;}{\f44\fnil\fcharset0\fprq2 Mini Pics Zafrica;}{\f45\fnil\fcharset0\fprq2 Newtron ICG Alt;}{\f46\fnil\fcharset0\fprq2 Newtron ICG Open;}{\f47\fnil\fcharset0\fprq2 Newtron ICG;} |
10 |
{\f48\fswiss\fcharset0\fprq2 News Gothic;}{\f49\fnil\fcharset0\fprq2 Paris Flash ICG;}{\f50\froman\fcharset0\fprq2 Park Avenue;}{\f51\froman\fcharset0\fprq2 Bernhard Modern Roman;}{\f52\fnil\fcharset0\fprq2 Republik Sans ICG 01;} |
11 |
{\f53\froman\fcharset0\fprq2 Stencil;}{\f54\fswiss\fcharset0\fprq2 Tempo HeavyCondensed;}{\f55\fnil\fcharset0\fprq2 Tigerteeth ICG;}{\f56\fswiss\fcharset0\fprq2 Umbra;}{\f57\froman\fcharset0\fprq2 Zebrawood Regular;} |
12 |
{\f58\fswiss\fcharset0\fprq2 VAG Rounded Thin;}{\f59\fswiss\fcharset0\fprq2 VAG Rounded Light;}{\f60\fswiss\fcharset0\fprq2 Myriad Condensed;}{\f61\fnil\fcharset0\fprq2 Wonton ICG;}{\f62\fmodern\fcharset0\fprq1 LinePrinter;} |
13 |
{\f63\froman\fcharset0\fprq2 CG Times;}{\f64\fswiss\fcharset0\fprq2 Univers;}{\f65\fswiss\fcharset0\fprq2 Univers Condensed;}{\f66\fswiss\fcharset0\fprq2 Antique Olive;}{\f67\froman\fcharset0\fprq2 Garamond;}{\f68\fswiss\fcharset0\fprq2 CG Omega;} |
14 |
{\f69\fswiss\fcharset0\fprq2 Albertus Medium;}{\f70\fswiss\fcharset0\fprq2 Albertus Extra Bold;}{\f71\froman\fcharset0\fprq2 Clarendon Condensed;}{\f72\fscript\fcharset0\fprq2 Coronet;}{\f73\fmodern\fcharset0\fprq1 Letter Gothic;} |
15 |
{\f74\fscript\fcharset0\fprq2 Marigold;}{\f75\fnil\fcharset2\fprq2 Wingdings;}{\f76\fnil\fcharset2\fprq2 Marlett;}{\f77\fswiss\fcharset0\fprq2 News Gothic MT;}{\f78\fscript\fcharset0\fprq2 Lucida Handwriting;}{\f79\fswiss\fcharset0\fprq2 Lucida Sans;} |
16 |
{\f80\fswiss\fcharset0\fprq2 Lucida Sans Unicode;}{\f81\froman\fcharset0\fprq2 Book Antiqua;}{\f82\fswiss\fcharset0\fprq2 Century Gothic;}{\f83\fmodern\fcharset0\fprq1 OCR A Extended;}{\f84\froman\fcharset0\fprq2 Calisto MT;} |
17 |
{\f85\fswiss\fcharset0\fprq2 Abadi MT Condensed Light;}{\f86\fswiss\fcharset0\fprq2 Copperplate Gothic Bold;}{\f87\fswiss\fcharset0\fprq2 Copperplate Gothic Light;}{\f88\fdecor\fcharset0\fprq2 Matisse ITC;}{\f89\fdecor\fcharset0\fprq2 Tempus Sans ITC;} |
18 |
{\f90\fdecor\fcharset0\fprq2 Westminster;}{\f91\fmodern\fcharset0\fprq1 Lucida Console;}{\f92\fswiss\fcharset0\fprq2 Tahoma;}{\f93\fswiss\fcharset0\fprq2 Arial Black;}{\f94\fscript\fcharset0\fprq2 Comic Sans MS;}{\f95\fswiss\fcharset0\fprq2 Impact;} |
19 |
{\f96\fswiss\fcharset0\fprq2 Verdana;}{\f97\froman\fcharset2\fprq2 Webdings;}{\f98\fswiss\fcharset0\fprq2 Arial Narrow;}{\f99\fdecor\fcharset0\fprq2 Curlz MT;}{\f100\froman\fcharset0\fprq2 Engravers MT;}{\f101\fswiss\fcharset0\fprq2 Franklin Gothic Book;} |
20 |
{\f102\fswiss\fcharset0\fprq2 Franklin Gothic Demi Cond;}{\f103\fswiss\fcharset0\fprq2 Franklin Gothic Heavy;}{\f104\fswiss\fcharset0\fprq2 Franklin Gothic Medium Cond;}{\f105\fscript\fcharset0\fprq2 Edwardian Script ITC;} |
21 |
{\f106\fdecor\fcharset0\fprq2 Jokerman;}{\f107\fdecor\fcharset0\fprq2 Juice ITC;}{\f108\fscript\fcharset0\fprq2 Mistral;}{\f109\froman\fcharset0\fprq2 Rockwell;}{\f110\froman\fcharset2\fprq2 Wingdings 2;}{\f111\froman\fcharset2\fprq2 MT Extra;} |
22 |
{\f112\fswiss\fcharset0\fprq2 Verdana Ref;}{\f113\froman\fcharset0\fprq2 Georgia Ref;}{\f114\fnil\fcharset2\fprq2 RefSpecialty;}{\f115\fnil\fcharset2\fprq2 MS Reference 1;}{\f116\fnil\fcharset2\fprq2 MS Reference 2;} |
23 |
{\f117\fswiss\fcharset0\fprq2 MS Reference Sans Serif;}{\f118\froman\fcharset0\fprq2 MS Reference Serif;}{\f119\fnil\fcharset2\fprq2 MS Reference Specialty;}{\f120\fswiss\fcharset2\fprq2 Mediascape OSD Icon;} |
24 |
{\f121\fswiss\fcharset0\fprq2 Haettenschweiler;}{\f122\froman\fcharset0\fprq2 Times New Roman MT Extra Bold;}{\f123\froman\fcharset0\fprq2 Century Schoolbook;}{\f124\fmodern\fcharset0\fprq1 Letter Gothic MT;} |
25 |
{\f125\froman\fcharset0\fprq2 Bookman Old Style;}{\f126\fnil\fcharset2\fprq2 Monotype Sorts;}{\f127\fscript\fcharset0\fprq2 Monotype Corsiva;}{\f128\fmodern\fcharset2\fprq1 MS LineDraw;}{\f129\fdecor\fcharset0\fprq2 Algerian;} |
26 |
{\f130\fswiss\fcharset0\fprq2 Arial Rounded MT Bold;}{\f131\fdecor\fcharset0\fprq2 Braggadocio;}{\f132\fswiss\fcharset0\fprq2 Britannic Bold;}{\f133\fscript\fcharset0\fprq2 Brush Script MT;}{\f134\fdecor\fcharset0\fprq2 Colonna MT;} |
27 |
{\f135\fdecor\fcharset0\fprq2 Desdemona;}{\f136\froman\fcharset0\fprq2 Footlight MT Light;}{\f137\fdecor\fcharset0\fprq2 Kino MT;}{\f138\froman\fcharset0\fprq2 Wide Latin;}{\f139\fscript\fcharset0\fprq2 Matura MT Script Capitals;} |
28 |
{\f140\fdecor\fcharset0\fprq2 Playbill;}{\f141\fswiss\fcharset2\fprq2 Bookshelf Symbol 1;}{\f142\fswiss\fcharset2\fprq2 Bookshelf Symbol 2;}{\f143\froman\fcharset2\fprq2 Bookshelf Symbol 3;}{\f144\froman\fcharset0\fprq2 Map Symbols;} |
29 |
{\f145\froman\fcharset0\fprq2 Georgia;}{\f146\fswiss\fcharset0\fprq2 Trebuchet MS;}{\f147\fmodern\fcharset128\fprq1 MS Gothic;}{\f148\fmodern\fcharset2\fprq1 Arial Alternative;}{\f149\fmodern\fcharset2\fprq1 Arial Alternative Symbol;} |
30 |
{\f150\fnil\fcharset0\fprq2 Bodoni-DTC;}{\f151\fnil\fcharset0\fprq2 Dom Casual;}{\f152\fnil\fcharset0\fprq2 Fette Engschrift;}{\f153\fswiss\fcharset0\fprq2 Franklin Cond. Gothic;}{\f154\fswiss\fcharset0\fprq2 Franklin Gothic;} |
31 |
{\f155\fswiss\fcharset0\fprq2 Garrison Cond. Sans;}{\f156\fswiss\fcharset0\fprq2 Garrison ExtraBold Sans;}{\f157\fswiss\fcharset0\fprq2 Garrison ExtraCond. Sans;}{\f158\fswiss\fcharset0\fprq2 Garrison Light Sans;} |
32 |
{\f159\fswiss\fcharset0\fprq2 Garrison Sans;}{\f160\froman\fcharset0\fprq2 Goudy Old Style;}{\f161\fdecor\fcharset0\fprq2 Kauflinn;}{\f162\fnil\fcharset0\fprq2 Optimum;}{\f163\fdecor\fcharset0\fprq2 VAG Round;} |
33 |
{\f164\froman\fcharset0\fprq2 Village Square;}{\f165\fdecor\fcharset0\fprq2 Windsor;}{\f166\fswiss\fcharset0\fprq1 MS Dialog;}{\f167\fnil\fcharset0\fprq1 Small Fonts;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; |
34 |
\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; |
35 |
\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\widctlpar \f4\fs20 \snext0 Normal;}{\s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 \sbasedon0\snext0 heading 1;}{ |
36 |
\s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 \sbasedon0\snext0 heading 2;}{\s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 \sbasedon0\snext0 heading 3;}{ |
37 |
\s4\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl4\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\b\f5 \sbasedon0\snext0 heading 4;}{\s5\sb240\sa60\widctlpar{\*\pn \pnlvl5\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5\fs22 \sbasedon0\snext0 heading 5;}{ |
38 |
\s6\sb240\sa60\widctlpar{\*\pn \pnlvl6\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\i\f4\fs22 \sbasedon0\snext0 heading 6;}{\s7\sb240\sa60\widctlpar{\*\pn \pnlvl7\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5\fs20 \sbasedon0\snext0 heading 7;}{ |
39 |
\s8\sb240\sa60\widctlpar{\*\pn \pnlvl8\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\i\f5\fs20 \sbasedon0\snext0 heading 8;}{\s9\sb240\sa60\widctlpar{\*\pn \pnlvl9\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\b\i\f5\fs18 \sbasedon0\snext0 heading 9;}{\* |
40 |
\cs10 \additive Default Paragraph Font;}{\s15\widctlpar\tqc\tx4320\tqr\tx8640 \f4\fs20 \sbasedon0\snext15 header;}{\s16\widctlpar\tqc\tx4320\tqr\tx8640 \f4\fs20 \sbasedon0\snext16 footer;}{\*\cs17 \additive\sbasedon10 page number;}{\s18\widctlpar |
41 |
\f4\fs20 \sbasedon0\snext18 footnote text;}{\*\cs19 \additive\super \sbasedon10 footnote reference;}{\s20\sb120\sa120\widctlpar\tqr\tldot\tx8640 \b\caps\f4\fs20 \sbasedon0\snext0 toc 1;}{\s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 |
42 |
\sbasedon0\snext0 toc 2;}{\s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 \sbasedon0\snext0 toc 3;}{\s23\li600\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 4;}{\s24\li800\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 5;}{ |
43 |
\s25\li1000\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 6;}{\s26\li1200\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 7;}{\s27\li1400\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 8;}{ |
44 |
\s28\li1600\widctlpar\tqr\tldot\tx8640 \f4\fs18 \sbasedon0\snext0 toc 9;}{\s29\widctlpar\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631\tx9590 \f11\fs20 \sbasedon0\snext29 Preformatted;}}{\*\revtbl {Unknown;}}{\info{\author David Ashley} |
45 |
{\operator David Ashley}{\creatim\yr2000\mo10\dy18\hr4\min48}{\revtim\yr2000\mo11\dy13\hr3\min50}{\printim\yr2000\mo11\dy13\hr3\min7}{\version9}{\edmins6}{\nofpages55}{\nofwords25439}{\nofchars145003}{\*\company Visteon Automotive Systems}{\vern57443}} |
46 |
\widowctrl\ftnbj\aenddoc\hyphcaps0\formshade \fet0\sectd \linex0\endnhere {\footer \pard\plain \s16\widctlpar\brdrt\brdrs\brdrw15\brsp20 \tqc\tx4320\tqr\tx8640 \f4\fs20 RAP_C_IMP.RTF\tab Page {\field{\*\fldinst {\cs17 PAGE }}{\fldrslt {\cs17\lang1024 1} |
47 |
}}{\cs17 Of }{\field{\*\fldinst {\cs17 NUMPAGES \\* MERGEFORMAT }}{\fldrslt {\cs17\lang1024 55}}}{\cs17 \tab Dave Ashley (DTASHLEY@AOL.COM) |
48 |
\par $Revision: 1.1 $\tab \tab $Date: 2001/09/25 21:44:55 $} |
49 |
\par }{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5 |
50 |
\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang |
51 |
{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \qc\widctlpar \f4\fs20 {\fs72 |
52 |
\par |
53 |
\par User\rquote s Manual To Accompany \ldblquote RAP\rdblquote Rational Approximation Software |
54 |
\par }\pard \widctlpar {\fs72 |
55 |
\par } |
56 |
\par |
57 |
\par |
58 |
\par |
59 |
\par |
60 |
\par |
61 |
\par |
62 |
\par |
63 |
\par |
64 |
\par |
65 |
\par |
66 |
\par |
67 |
\par |
68 |
\par |
69 |
\par |
70 |
\par |
71 |
\par \pard \qc\widctlpar David T. Ashley, (DTASHLEY@AOL.COM) |
72 |
\par Joseph P. DeVoe (JDEVOE@VISTEON.COM) |
73 |
\par Cory Pratt (CORY_PRATT@3COM.COM) |
74 |
\par Karl Perttunen (KPERTTUN@VISTEON.COM) |
75 |
\par Anatoly Zhigljvasky (ZHIGLJAVSKYAA@CARDIFF.AC.UK) |
76 |
\par David Eppstein (EPPSTEIN@ICS.UCI.EDU) |
77 |
\par David M. Einstein (DEINST@WORLD.STD.COM) |
78 |
\par 10/18/2000 |
79 |
\par \pard \widctlpar |
80 |
\par \pard \qc\widctlpar \page {\b\fs28 TABLE OF CONTENTS |
81 |
\par }\pard \widctlpar |
82 |
\par \pard\plain \s20\sb120\sa120\widctlpar\tqr\tldot\tx8640 \b\caps\f4\fs20 {\field\fldedit{\*\fldinst TOC \\o "1-5" }{\fldrslt {\lang1024 1. Introduction And Overview\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721621 }{\field{\*\fldinst { |
83 |
\lang1024 PAGEREF _Toc498721621 }}{\fldrslt {\lang1024 5}}}}}{\lang1024 |
84 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 1.1 Scope Of This Document\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721622 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721622 }}{\fldrslt {\lang1024 5}}}}}{ |
85 |
\lang1024 |
86 |
\par 1.2 Overview Of RAP Functionality\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721623 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721623 }}{\fldrslt {\lang1024 5}}}}}{\lang1024 |
87 |
\par 1.3 RAP Absolute Maximums\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721624 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721624 }}{\fldrslt {\lang1024 5}}}}}{\lang1024 |
88 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 1.3.1 Maximum Data Sizes\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721625 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721625 }}{\fldrslt {\lang1024 6}}}}}{\lang1024 |
89 |
|
90 |
\par 1.3.2 Maximum Length Of Standard Input Stream\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721626 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721626 }}{\fldrslt {\lang1024 6}}}}}{\lang1024 |
91 |
\par 1.3.3 Maximum Number Of Farey Neighbors Generated\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721627 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721627 }}{\fldrslt {\lang1024 6}}}}}{\lang1024 |
92 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 1.4 RAP Authors And Algorithm Authors\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721628 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721628 }}{\fldrslt {\lang1024 6 |
93 |
}}}}}{\lang1024 |
94 |
\par 1.5 Statement Of Reliability And Intended Use\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721629 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721629 }}{\fldrslt {\lang1024 7}}}}}{\lang1024 |
95 |
\par 1.6 Embedded Version Control Information\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721630 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721630 }}{\fldrslt {\lang1024 7}}}}}{\lang1024 |
96 |
\par 1.7 Bug Reports\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721631 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721631 }}{\fldrslt {\lang1024 7}}}}}{\lang1024 |
97 |
\par }\pard\plain \s20\sb120\sa120\widctlpar\tqr\tldot\tx8640 \b\caps\f4\fs20 {\lang1024 2. Portability Of RAP Source Code\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721632 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721632 }}{\fldrslt { |
98 |
\lang1024 7}}}}}{\lang1024 |
99 |
\par 3. Invoking RAP And Specifying Commands\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721633 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721633 }}{\fldrslt {\lang1024 8}}}}}{\lang1024 |
100 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 3.1 RAP Invocation Modes\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721634 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721634 }}{\fldrslt {\lang1024 8}}}}}{ |
101 |
\lang1024 |
102 |
\par 3.2 Token Concatenation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721635 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721635 }}{\fldrslt {\lang1024 10}}}}}{\lang1024 |
103 |
\par 3.3 Case Sensitivity Of RAP\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721636 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721636 }}{\fldrslt {\lang1024 10}}}}}{\lang1024 |
104 |
\par 3.4 Comments In Batch Mode\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721637 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721637 }}{\fldrslt {\lang1024 10}}}}}{\lang1024 |
105 |
\par 3.5 Saving RAP Output To A File\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721638 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721638 }}{\fldrslt {\lang1024 10}}}}}{\lang1024 |
106 |
\par 3.6 Error Behavior Of RAP\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721639 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721639 }}{\fldrslt {\lang1024 10}}}}}{\lang1024 |
107 |
\par 3.7 Specification Of Integers To RAP\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721640 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721640 }}{\fldrslt {\lang1024 11}}}}}{\lang1024 |
108 |
\par 3.8 Specification Of Rational Numbers To RAP\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721641 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721641 }}{\fldrslt {\lang1024 11}}}}}{\lang1024 |
109 |
\par }\pard\plain \s20\sb120\sa120\widctlpar\tqr\tldot\tx8640 \b\caps\f4\fs20 {\lang1024 4. Detailed Descriptions Of Commands\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721642 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721642 }}{\fldrslt { |
110 |
\lang1024 12}}}}}{\lang1024 |
111 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.1 Integer Sum [+]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721643 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721643 }}{\fldrslt {\lang1024 12}}}}}{\lang1024 |
112 |
|
113 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.1.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721644 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721644 }}{\fldrslt {\lang1024 12}}}}} |
114 |
{\lang1024 |
115 |
\par 4.1.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721645 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721645 }}{\fldrslt {\lang1024 12}}}}}{\lang1024 |
116 |
\par 4.1.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721646 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721646 }}{\fldrslt {\lang1024 12}}}}}{\lang1024 |
117 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.2 Integer Difference [-]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721647 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721647 }}{\fldrslt {\lang1024 13}}}}}{ |
118 |
\lang1024 |
119 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.2.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721648 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721648 }}{\fldrslt {\lang1024 13}}}}} |
120 |
{\lang1024 |
121 |
\par 4.2.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721649 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721649 }}{\fldrslt {\lang1024 13}}}}}{\lang1024 |
122 |
\par 4.2.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721650 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721650 }}{\fldrslt {\lang1024 13}}}}}{\lang1024 |
123 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.3 Integer Product [*]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721651 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721651 }}{\fldrslt {\lang1024 14}}}}}{ |
124 |
\lang1024 |
125 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.3.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721652 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721652 }}{\fldrslt {\lang1024 14}}}}} |
126 |
{\lang1024 |
127 |
\par 4.3.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721653 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721653 }}{\fldrslt {\lang1024 14}}}}}{\lang1024 |
128 |
\par 4.3.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721654 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721654 }}{\fldrslt {\lang1024 14}}}}}{\lang1024 |
129 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.4 Integer Quotient [/]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721655 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721655 }}{\fldrslt {\lang1024 15}}}}}{ |
130 |
\lang1024 |
131 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.4.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721656 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721656 }}{\fldrslt {\lang1024 15}}}}} |
132 |
{\lang1024 |
133 |
\par 4.4.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721657 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721657 }}{\fldrslt {\lang1024 15}}}}}{\lang1024 |
134 |
\par 4.4.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721658 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721658 }}{\fldrslt {\lang1024 15}}}}}{\lang1024 |
135 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.5 Integer Remainder [%]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721659 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721659 }}{\fldrslt {\lang1024 16}}}}}{ |
136 |
\lang1024 |
137 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.5.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721660 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721660 }}{\fldrslt {\lang1024 16}}}}} |
138 |
{\lang1024 |
139 |
\par 4.5.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721661 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721661 }}{\fldrslt {\lang1024 16}}}}}{\lang1024 |
140 |
\par 4.5.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721662 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721662 }}{\fldrslt {\lang1024 16}}}}}{\lang1024 |
141 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.6 Integer Raised To An Integer Power [**]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721663 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721663 }}{\fldrslt { |
142 |
\lang1024 17}}}}}{\lang1024 |
143 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.6.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721664 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721664 }}{\fldrslt {\lang1024 17}}}}} |
144 |
{\lang1024 |
145 |
\par 4.6.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721665 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721665 }}{\fldrslt {\lang1024 17}}}}}{\lang1024 |
146 |
\par 4.6.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721666 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721666 }}{\fldrslt {\lang1024 17}}}}}{\lang1024 |
147 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.7 Greatest Common Divisor [GCD]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721667 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721667 }}{\fldrslt {\lang1024 18}}} |
148 |
}}{\lang1024 |
149 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.7.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721668 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721668 }}{\fldrslt {\lang1024 18}}}}} |
150 |
{\lang1024 |
151 |
\par 4.7.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721669 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721669 }}{\fldrslt {\lang1024 18}}}}}{\lang1024 |
152 |
\par 4.7.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721670 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721670 }}{\fldrslt {\lang1024 18}}}}}{\lang1024 |
153 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.8 Decimal Approximation [DAP]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721671 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721671 }}{\fldrslt {\lang1024 19}}}}} |
154 |
{\lang1024 |
155 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.8.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721672 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721672 }}{\fldrslt {\lang1024 19}}}}} |
156 |
{\lang1024 |
157 |
\par 4.8.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721673 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721673 }}{\fldrslt {\lang1024 19}}}}}{\lang1024 |
158 |
\par 4.8.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721674 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721674 }}{\fldrslt {\lang1024 19}}}}}{\lang1024 |
159 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.9 Rational Number Sum [+]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721675 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721675 }}{\fldrslt {\lang1024 22}}}}}{ |
160 |
\lang1024 |
161 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.9.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721676 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721676 }}{\fldrslt {\lang1024 22}}}}} |
162 |
{\lang1024 |
163 |
\par 4.9.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721677 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721677 }}{\fldrslt {\lang1024 22}}}}}{\lang1024 |
164 |
\par 4.9.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721678 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721678 }}{\fldrslt {\lang1024 22}}}}}{\lang1024 |
165 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.10 Rational Number Difference [-]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721679 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721679 }}{\fldrslt {\lang1024 23} |
166 |
}}}}{\lang1024 |
167 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.10.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721680 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721680 }}{\fldrslt {\lang1024 23}}} |
168 |
}}{\lang1024 |
169 |
\par 4.10.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721681 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721681 }}{\fldrslt {\lang1024 23}}}}}{\lang1024 |
170 |
\par 4.10.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721682 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721682 }}{\fldrslt {\lang1024 23}}}}}{\lang1024 |
171 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.11 Rational Number Product [*]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721683 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721683 }}{\fldrslt {\lang1024 24}}} |
172 |
}}{\lang1024 |
173 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.11.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721684 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721684 }}{\fldrslt {\lang1024 24}}} |
174 |
}}{\lang1024 |
175 |
\par 4.11.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721685 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721685 }}{\fldrslt {\lang1024 24}}}}}{\lang1024 |
176 |
\par 4.11.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721686 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721686 }}{\fldrslt {\lang1024 24}}}}}{\lang1024 |
177 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.12 Rational Number Quotient [/]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721687 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721687 }}{\fldrslt {\lang1024 25}}} |
178 |
}}{\lang1024 |
179 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.12.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721688 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721688 }}{\fldrslt {\lang1024 25}}} |
180 |
}}{\lang1024 |
181 |
\par 4.12.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721689 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721689 }}{\fldrslt {\lang1024 25}}}}}{\lang1024 |
182 |
\par 4.12.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721690 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721690 }}{\fldrslt {\lang1024 25}}}}}{\lang1024 |
183 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.13 Rational Number Raised To An Integer Power [**]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721691 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721691 } |
184 |
}{\fldrslt {\lang1024 26}}}}}{\lang1024 |
185 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.13.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721692 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721692 }}{\fldrslt {\lang1024 26}}} |
186 |
}}{\lang1024 |
187 |
\par 4.13.2 Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721693 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721693 }}{\fldrslt {\lang1024 26}}}}}{\lang1024 |
188 |
\par 4.13.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721694 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721694 }}{\fldrslt {\lang1024 26}}}}}{\lang1024 |
189 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.14 Continued Fraction Partial Quotients And Convergents Of A Rational Number [CF]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721695 }{\field{\*\fldinst {\lang1024 |
190 |
PAGEREF _Toc498721695 }}{\fldrslt {\lang1024 27}}}}}{\lang1024 |
191 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.14.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721696 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721696 }}{\fldrslt {\lang1024 27}}} |
192 |
}}{\lang1024 |
193 |
\par 4.14.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721697 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721697 }}{\fldrslt {\lang1024 27}}}}}{\lang1024 |
194 |
\par 4.14.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721698 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721698 }}{\fldrslt {\lang1024 27}}}}}{\lang1024 |
195 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.15 Rational Number With Smallest Denominator In An Interval [MIND]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721699 }{\field{\*\fldinst {\lang1024 PAGEREF |
196 |
_Toc498721699 }}{\fldrslt {\lang1024 30}}}}}{\lang1024 |
197 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.15.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721700 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721700 }}{\fldrslt {\lang1024 30}}} |
198 |
}}{\lang1024 |
199 |
\par 4.15.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721701 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721701 }}{\fldrslt {\lang1024 30}}}}}{\lang1024 |
200 |
\par 4.15.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721702 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721702 }}{\fldrslt {\lang1024 30}}}}}{\lang1024 |
201 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.16 Enclosing Rational Numbers In The Farey Series Of Order N [FN]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721703 }{\field{\*\fldinst {\lang1024 PAGEREF |
202 |
_Toc498721703 }}{\fldrslt {\lang1024 32}}}}}{\lang1024 |
203 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.16.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721704 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721704 }}{\fldrslt {\lang1024 32}}} |
204 |
}}{\lang1024 |
205 |
\par 4.16.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721705 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721705 }}{\fldrslt {\lang1024 32}}}}}{\lang1024 |
206 |
\par 4.16.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721706 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721706 }}{\fldrslt {\lang1024 32}}}}}{\lang1024 |
207 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.17 Upper Bound On Distance Between Farey Terms In An Interval [FNDMAX]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721707 }{\field{\*\fldinst {\lang1024 PAGEREF |
208 |
_Toc498721707 }}{\fldrslt {\lang1024 41}}}}}{\lang1024 |
209 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.17.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721708 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721708 }}{\fldrslt {\lang1024 41}}} |
210 |
}}{\lang1024 |
211 |
\par 4.17.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721709 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721709 }}{\fldrslt {\lang1024 41}}}}}{\lang1024 |
212 |
\par 4.17.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721710 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721710 }}{\fldrslt {\lang1024 41}}}}}{\lang1024 |
213 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.18 Enclosing Rational Numbers In A Rectangular Area Of The Integer Lattice [FAB]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721711 }{\field{\*\fldinst {\lang1024 |
214 |
PAGEREF _Toc498721711 }}{\fldrslt {\lang1024 44}}}}}{\lang1024 |
215 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.18.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721712 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721712 }}{\fldrslt {\lang1024 44}}} |
216 |
}}{\lang1024 |
217 |
\par 4.18.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721713 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721713 }}{\fldrslt {\lang1024 44}}}}}{\lang1024 |
218 |
\par 4.18.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721714 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721714 }}{\fldrslt {\lang1024 44}}}}}{\lang1024 |
219 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 4.19 Upper Bound On Distance Between Members Of F}{\lang1024\sub A,B}{\lang1024 In An Interval [FABDMAX]\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721715 } |
220 |
{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721715 }}{\fldrslt {\lang1024 50}}}}}{\lang1024 |
221 |
\par }\pard\plain \s22\li400\widctlpar\tqr\tldot\tx8640 \i\f4\fs20 {\lang1024 4.19.1 Command Line Invocation Forms\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721716 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721716 }}{\fldrslt {\lang1024 50}}} |
222 |
}}{\lang1024 |
223 |
\par 4.19.2 Detailed Algorithm Description\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721717 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721717 }}{\fldrslt {\lang1024 50}}}}}{\lang1024 |
224 |
\par 4.19.3 Example Invocation\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721718 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721718 }}{\fldrslt {\lang1024 50}}}}}{\lang1024 |
225 |
\par }\pard\plain \s20\sb120\sa120\widctlpar\tqr\tldot\tx8640 \b\caps\f4\fs20 {\lang1024 5. Digits Of Useful Constants\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721719 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721719 }}{\fldrslt {\lang1024 54 |
226 |
}}}}}{\lang1024 |
227 |
\par }\pard\plain \s21\li200\widctlpar\tqr\tldot\tx8640 \scaps\f4\fs20 {\lang1024 5.1 Digits Of }{\lang1024 {\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}{\lang1024 \tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721720 } |
228 |
{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721720 }}{\fldrslt {\lang1024 54}}}}}{\lang1024 |
229 |
\par 5.2 Digits Of e\tab }{\field{\*\fldinst {\lang1024 GOTOBUTTON _Toc498721721 }{\field{\*\fldinst {\lang1024 PAGEREF _Toc498721721 }}{\fldrslt {\lang1024 55}}}}}{\lang1024 |
230 |
\par }\pard\plain \widctlpar \f4\fs20 }}\pard\plain \widctlpar \f4\fs20 |
231 |
\par |
232 |
\par \page |
233 |
\par {\*\bkmkstart _Toc498721621}{\pntext\pard\plain\b\f5\fs28\kerning28 1.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 Introduction And Overview{\*\bkmkend _Toc498721621} |
234 |
\par \pard\plain \widctlpar \f4\fs20 |
235 |
\par {\*\bkmkstart _Toc498721622}{\pntext\pard\plain\b\i\f5 1.1\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Scope Of This Document{\*\bkmkend _Toc498721622} |
236 |
\par \pard\plain \widctlpar \f4\fs20 This manual accompanies the rational approximation software program submitted to CALGO (the ACM collected algorithms), in support of a paper entitled \ldblquote {\i On Best Rational Approximations Using Large Integers} |
237 |
\rdblquote submitted to TOMS (ACM Transactions On Mathematical Software) in late 2000. The software program is named RAP (mnemonic for {\i r}ational {\i ap} |
238 |
proximation), and this acronym will be used throughout this document to refer to the software program. This document explains the operation and limitations of RAP. |
239 |
\par |
240 |
\par {\*\bkmkstart _Toc498721623}{\pntext\pard\plain\b\i\f5 1.2\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Overview Of RAP Functionality{\*\bkmkend _Toc498721623} |
241 |
\par \pard\plain \widctlpar \f4\fs20 |
242 |
RAP implements a set of useful algorithms on very large integers and rational numbers with large integer components. RAP implements operations on long integers by representing all integers as character strings, and performing multiplication, division, an |
243 |
d other primitive operations using the same \ldblquote long-hand\rdblquote techniques taught in elementary school. |
244 |
\par |
245 |
\par RAP is able to implement the following operations on integers and rational numbers. Each distinct operation includes the command |
246 |
code for the operation used to specify it to RAP, in square brackets. Each operation is explained in detail later in the manual. |
247 |
\par |
248 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\b Integer Sum [+].} |
249 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Integer Difference [-].} |
250 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Integer Product [*].} |
251 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Integer Quotient [/].} |
252 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Integer Remainder [%].} |
253 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Integer Raised To An Integer Power [**].} |
254 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Greatest Common Divisor [GCD].} |
255 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Decimal Approximation [DAP].} |
256 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number Sum [+].} |
257 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number Difference [-].} |
258 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number Product [*].} |
259 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number Quotient [/].} |
260 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number Raised To An Integer Power [**].} |
261 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Continued Fraction Partial Quotients And Convergents Of A Rational Number [CF].} |
262 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Rational Number With The Smallest Denominator In An Interval [MIND].} |
263 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Enclosing Rational Numbers In The Farey Series Of Order N [FN].} |
264 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Upper Bound On Distance Between Farey Terms In An Interval [FNDMAX].} |
265 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Enclosing Rational Numbers In A Rectangular Area Of The Integer Lattice [FAB].} |
266 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Upper Bound On Distance Between Members Of F}{\b\sub A,B}{\b In An Interval [FABDMAX].} |
267 |
\par \pard \widctlpar |
268 |
\par {\*\bkmkstart _Toc498721624}{\pntext\pard\plain\b\i\f5 1.3\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 RAP Absolute Maximums{\*\bkmkend _Toc498721624} |
269 |
\par \pard\plain \widctlpar \f4\fs20 |
270 |
\par {\*\bkmkstart _Toc498721625}{\pntext\pard\plain\f5 1.3.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Maximum Data Sizes{\*\bkmkend _Toc498721625} |
271 |
\par \pard\plain \widctlpar \f4\fs20 To avoid confusion in the discussion which follows, integers which are in binary format and are primitive data types in the \lquote C\rquote programming language are called {\i native} |
272 |
integers; and integers which are maintained by RAP as long strings of decimal digits are called {\i synthetic} integers. |
273 |
\par |
274 |
\par RAP is designed to freely operate within the Farey series of up to order 2{\super 1536}. (2{\super 1536} is about 2.4 {{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} 10{\super 462} |
275 |
.) Because RAP manipulates synthetic integers as decimal character strings, the limit of 2{\super 1536} |
276 |
is enforced by prohibiting synthetic integers as input which exceed 463 digits (meaning that RAP will actually accept synthetic integers up to and including 10{\super 463}-1, a number somewhat larger than 2{\super 1536} |
277 |
.). Additionally, no internal intermediate result or output result in RAP may exceed 4,000 decimal digits. |
278 |
\par |
279 |
\par The limits of 2{\super 1536} and 4,000 were chosen out of convenience rather than necessity. The absolute maximums |
280 |
are specified as compile-time preprocessor constants, and allow RAP to operate more efficiently (and allow the code to be more compact) than if internal data structures were allowed to grow arbitrarily. In RAP, {\i every} |
281 |
synthetic integer used for applying the algorithms presented in the TOMS paper has 4,000 digits when it is created\emdash |
282 |
it is never necessary to dynamically resize the storage allocated for such a synthetic integer. Additionally, the limit of 4,000 keeps RAP comfortably clear of platform-specific data size limits for native integers used to index into strings\emdash |
283 |
the ANSI \lquote C\rquote standard guarantees that an unsigned native integer variable can attain at least 65,535 on any platform. RAP can be recompiled with larger upper limits, but this is neither recommended nor supported. |
284 |
\par |
285 |
\par If the data size limits of RAP are exceeded, RAP will announce the error and abort gracefully. There is no known circumstance where RAP will give incorrect results due to an undetected synthetic integer size overflow. |
286 |
\par |
287 |
\par {\*\bkmkstart _Toc498721626}{\pntext\pard\plain\f5 1.3.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Maximum Length Of Standard Input Stream{\*\bkmkend _Toc498721626} |
288 |
\par \pard\plain \widctlpar \f4\fs20 |
289 |
If RAP is used in batch mode (described later), the standard input stream must not exceed 31,999 characters before RAP encounters the end-of-file (this is because RAP buffers the input stream before processing it). If this maximum is violated, RAP will a |
290 |
nnounce the error and gracefully abort. |
291 |
\par |
292 |
\par {\*\bkmkstart _Toc498721627}{\pntext\pard\plain\f5 1.3.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Maximum Number Of Farey Neighbors Generated{\*\bkmkend _Toc498721627} |
293 |
\par \pard\plain \widctlpar \f4\fs20 RAP will generate no more than 10,000 Farey neighbors on either side of a rational number. This limit is enforced to avoid platform-specific issues with native integers if RAP is ported. |
294 |
\par |
295 |
\par {\*\bkmkstart _Toc498721628}{\pntext\pard\plain\b\i\f5 1.4\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 RAP Authors And Algorithm Authors{\*\bkmkend _Toc498721628} |
296 |
\par \pard\plain \widctlpar \f4\fs20 |
297 |
The RAP software was developed exclusively by Dave Ashley. However, the algorithms that RAP applies were developed by all of the contributors listed below. Note that David Eppstein and David M. Einstein are not authors on the TOMS paper\emdash via the { |
298 |
\f11 sci.math} newsgroup, they contributed approaches for finding a rational number with the smallest denominator within an interval. All of the contributors listed below should be listed as authors for the algorithms in CALGO. |
299 |
\par |
300 |
\par |
301 |
\par \trowd \trgaph108\trleft-108\trkeep\trhdr\trbrdrt\brdrs\brdrw15\brdrcf15 \trbrdrl\brdrs\brdrw15\brdrcf15 \trbrdrb\brdrs\brdrw15\brdrcf15 \trbrdrr\brdrs\brdrw15\brdrcf15 \trbrdrh\brdrs\brdrw15\brdrcf15 \trbrdrv\brdrs\brdrw15\brdrcf15 \clbrdrt |
302 |
\brdrs\brdrw15\brdrcf1 \clbrdrl\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 \cellx2250\clbrdrt\brdrs\brdrw15\brdrcf1 \clbrdrl\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 |
303 |
\cellx4950\clbrdrt\brdrs\brdrw15\brdrcf1 \clbrdrl\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 \cellx8748 \pard \qc\keep\keepn\widctlpar\intbl {\b\cf8 Algorithm\cell E-mail\cell Home\cell }\pard \widctlpar\intbl { |
304 |
\b\cf8 \row }\trowd \trgaph108\trleft-108\trkeep\trhdr\trbrdrt\brdrs\brdrw15\brdrcf15 \trbrdrl\brdrs\brdrw15\brdrcf15 \trbrdrb\brdrs\brdrw15\brdrcf15 \trbrdrr\brdrs\brdrw15\brdrcf15 \trbrdrh\brdrs\brdrw15\brdrcf15 \trbrdrv\brdrs\brdrw15\brdrcf15 \clbrdrl |
305 |
\brdrs\brdrw15\brdrcf1 \clbrdrb\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 \cellx2250\clbrdrl\brdrs\brdrw15\brdrcf1 \clbrdrb\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 |
306 |
\cellx4950\clbrdrl\brdrs\brdrw15\brdrcf1 \clbrdrb\brdrs\brdrw15\brdrcf1 \clbrdrr\brdrs\brdrw15\brdrcf1 \clcfpat1\clcbpat8\clshdng6000 \cellx8748 \pard \qc\keep\keepn\widctlpar\intbl {\b\cf8 Author\cell Address\cell Page\cell }\pard \widctlpar\intbl { |
307 |
\b\cf8 \row }\trowd \trgaph108\trleft-108\trkeep\trbrdrt\brdrs\brdrw15\brdrcf15 \trbrdrl\brdrs\brdrw15\brdrcf15 \trbrdrb\brdrs\brdrw15\brdrcf15 \trbrdrr\brdrs\brdrw15\brdrcf15 \trbrdrh\brdrs\brdrw15\brdrcf15 \trbrdrv\brdrs\brdrw15\brdrcf15 \clbrdrl |
308 |
\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx2250\clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx4950\clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb |
309 |
\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx8748 \pard \keep\keepn\widctlpar\intbl David T. Ashley\cell dtashley@aol.com\cell N/A\cell \pard \widctlpar\intbl \row \trowd \trgaph108\trleft-108\trkeep\trbrdrt\brdrs\brdrw15\brdrcf15 |
310 |
\trbrdrl\brdrs\brdrw15\brdrcf15 \trbrdrb\brdrs\brdrw15\brdrcf15 \trbrdrr\brdrs\brdrw15\brdrcf15 \trbrdrh\brdrs\brdrw15\brdrcf15 \trbrdrv\brdrs\brdrw15\brdrcf15 \clbrdrt\brdrs\brdrw15\brdrcf15 \clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb |
311 |
\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx2250\clbrdrt\brdrs\brdrw15\brdrcf15 \clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx4950\clbrdrt\brdrs\brdrw15\brdrcf15 \clbrdrl |
312 |
\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx8748 \pard \keep\keepn\widctlpar\intbl Joseph P. DeVoe\cell jdevoe@visteon.com\cell N/A\cell \pard \widctlpar\intbl \row \pard \keep\keepn\widctlpar\intbl |
313 |
Cory Pratt\cell cory_pratt@3com.com\cell N/A\cell \pard \widctlpar\intbl \row \pard \keep\keepn\widctlpar\intbl Karl Perttunen\cell kperttun@visteon.com\cell N/A\cell \pard \widctlpar\intbl \row \pard \keep\keepn\widctlpar\intbl Anatoly Zhigljavsky\cell |
314 |
zhigljavskyaa@cardiff.ac.uk\cell http://www.cf.ac.uk/maths/zhigljavskyaa/\cell \pard \widctlpar\intbl \row \pard \keep\keepn\widctlpar\intbl David Eppstein\cell eppstein@ics.uci.edu\cell http://www.ics.uci.edu/~eppstein/\cell \pard \widctlpar\intbl \row |
315 |
\trowd \trgaph108\trleft-108\trkeep\trbrdrt\brdrs\brdrw15\brdrcf15 \trbrdrl\brdrs\brdrw15\brdrcf15 \trbrdrb\brdrs\brdrw15\brdrcf15 \trbrdrr\brdrs\brdrw15\brdrcf15 \trbrdrh\brdrs\brdrw15\brdrcf15 \trbrdrv\brdrs\brdrw15\brdrcf15 \clbrdrt |
316 |
\brdrs\brdrw15\brdrcf15 \clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx2250\clbrdrt\brdrs\brdrw15\brdrcf15 \clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr |
317 |
\brdrs\brdrw15\brdrcf15 \cellx4950\clbrdrt\brdrs\brdrw15\brdrcf15 \clbrdrl\brdrs\brdrw15\brdrcf15 \clbrdrb\brdrs\brdrw15\brdrcf15 \clbrdrr\brdrs\brdrw15\brdrcf15 \cellx8748 \pard \keep\keepn\widctlpar\intbl David M. Einstein\cell deinst@world.std.com |
318 |
\cell N/A\cell \pard \widctlpar\intbl \row \pard \widctlpar |
319 |
\par {\*\bkmkstart _Toc498721629}{\pntext\pard\plain\b\i\f5 1.5\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Statement Of Reliability And Intended Use{\*\bkmkend _Toc498721629} |
320 |
\par \pard\plain \widctlpar \f4\fs20 |
321 |
RAP is a research-grade tool, and is intended only to demonstrate for research purposes the algorithms presented in the TOMS paper. RAP has not been subjected to standard software engineering practices which help to minimize the probability of defects, s |
322 |
uch as unit-testing or peer review. RAP is research-grade, intended only to illustrate concepts, and absolutely unsuitable for any application where injury, loss of life, or financial losses could occur because of improper operation of the software. RAP |
323 |
is provided \ldblquote as-is\rdblquote with no warranty of any kind. |
324 |
\par |
325 |
\par {\*\bkmkstart _Toc498721630}{\pntext\pard\plain\b\i\f5 1.6\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Embedded Version Control Information{\*\bkmkend _Toc498721630} |
326 |
\par \pard\plain \widctlpar \f4\fs20 |
327 |
For convenience, both this document (in the footer) and the RAP software (information emitted on every invocation) contain embedded version control information, which is inserted automatically by a version control tool. Versions of this document which ha |
328 |
ve different version control information in the footer are necessarily different. Executable copies of RAP which emit different version control information when the software is invoked are necessarily different. |
329 |
\par |
330 |
\par This document and the RAP program are version-controlled separately. This means that this document generally won\rquote |
331 |
t have the same revision number as the RAP executable, and there is no way to make the association between document version and RAP executable version. However, the most current versions of each (i.e. the versions which \ldblquote belong\rdblquote |
332 |
together) are distributed through CALGO. |
333 |
\par |
334 |
\par {\*\bkmkstart _Toc498721631}{\pntext\pard\plain\cs17\b\i\f5 1.7\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 {\cs17 Bug Reports{\*\bkmkend _Toc498721631} |
335 |
\par }\pard\plain \widctlpar \f4\fs20 |
336 |
The probability of finding a bug in the operation of the RAP program is very low. Because RAP performs a small number of repetitive operations on large data (adding digits and processing carries, for example), RAP does not fit the profile of software whi |
337 |
ch is good at concealing defects. Defects which would become apparent with large data would generally also become apparent with small data, and the program was exercised with much small data. |
338 |
\par |
339 |
\par Please submit all bug reports to Dave Ashley (and the other contributors if you have difficulty in reaching Dave). If the bug can be reproduced, it will be fixed and RAP will be re-released to CALGO. |
340 |
\par |
341 |
\par {\*\bkmkstart _Toc498721632}{\pntext\pard\plain\b\f5\fs28\kerning28 2.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 Portability Of RAP Source Code{\*\bkmkend _Toc498721632} |
342 |
|
343 |
\par \pard\plain \widctlpar \f4\fs20 |
344 |
RAP is provided to CALGO with a binary executable for Win32-capable platforms (this should include Windows 95, Windows 98, Windows ME, Windows NT, and Windows 2000). Use of RAP on any of these platforms should not require recompilation because the binary |
345 |
executable is already available. This section contains portability notes in the event RAP must be compiled for other platforms. |
346 |
\par |
347 |
\par RAP is written in ANSI \lquote C\rquote |
348 |
, in a single software module. Because only one software module is used, no header files are included. Enumerated below are requirements on any target system and issues which may affect portability favorably or unfavorably. |
349 |
\par |
350 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}} |
351 |
RAP was compiled for Win32 as a Win32 console application under Microsoft Visual C++ Version 6.0. The file RAP_C.C contains a function named {\i main_c()}, which is the main function of the program, |
352 |
called from a C++ wrapper in another file. For recompilation on another platform, only the file RAP_C.C is required, and the function {\i main_c()} must be renamed to {\i main()}. |
353 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The only known possible portability issue with RAP is the use of the preprocessor symbol \ldblquote __LINE__\rdblquote |
354 |
, which is used with a home-made assertion mechanism to emit the line number where an assertion fails. If \ldblquote __LINE__\rdblquote won\rquote t compile, it would be necessary t |
355 |
o either find the name of a similar symbol for the target system, or else replace all occurrences of __LINE__ with a constant integer, such as 0. |
356 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The C++ record oriented comment delimiter \ldblquote //\rdblquote is not used, although many \lquote C\rquote compilers allow its use. Only \ldblquote /*\rdblquote and \ldblquote */\rdblquote are used. |
357 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Nested comments are not used, because not all compiler support them.{\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 {\cs19\super \chftn } A nested comment is multiple occurrences of \ldblquote /* |
358 |
\rdblquote before a matching \ldblquote */\rdblquote . For example, \ldblquote /* /* */ */\rdblquote is a nested comment. A compiler that tolerates nested comments is sometimes helpful because it allows large blocks of code containing comme |
359 |
nts to be removed from the compilation stream by enclosing the block in \ldblquote /*\rdblquote and \ldblquote */\rdblquote .}} |
360 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}RAP assumes the existence of the standard dynamic memory allocation functions {\i malloc()}, {\i realloc()}, and {\i free()}. {\i malloc()}, {\i realloc()}, and {\i free()} must work correctly on the target system. |
361 |
|
362 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}For command-line parameters, the target system must support {\i argv} and {\i argc} in the standard way. |
363 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Both signed and unsigned integers in the target system must be at least 16 bits, and must be able to attain a positive value of at least 32,100. |
364 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}On input in batch mode, the {\i getchar()} family of functions is used to read from the standard input stream. The target system must support these. |
365 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}On output, the {\i printf()} family of functions is used. The target system must support these. |
366 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The character set of the target machine must have the digits \lquote 0\rquote through \lquote 9\rquote as contiguous and increasing (RAP performs some calculations making this assumption\emdash |
367 |
this is a nearly universal feature of most character sets). |
368 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}RAP performs no console manipulation and does not write to {\i stderr} (this should increase its portability). |
369 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}RAP should port to Unix systems with no changes whatsoever, except the possible issue with __LINE__ noted above. |
370 |
\par \pard \widctlpar |
371 |
\par {\*\bkmkstart _Toc498721633}{\pntext\pard\plain\b\f5\fs28\kerning28 3.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 Invoking RAP And Specifying Commands |
372 |
{\*\bkmkend _Toc498721633} |
373 |
\par \pard\plain \widctlpar \f4\fs20 |
374 |
\par {\*\bkmkstart _Toc498721634}{\pntext\pard\plain\b\i\f5 3.1\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 RAP Invocation Modes{\*\bkmkend _Toc498721634} |
375 |
\par \pard\plain \widctlpar \f4\fs20 RAP operates in two different modes, depending on the command line parameters when RAP is invoked. |
376 |
\par |
377 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\b Interactive Mode.} |
378 |
If all of the information that RAP requires to perform an individual command is present on the command line, RAP will perform the command and exit. This allows RAP to be used as an interactive calculator to answer impromptu queries. |
379 |
\par \pard \widctlpar |
380 |
\par \pard \li1080\widctlpar For example, invoking RAP with the command line: |
381 |
\par |
382 |
\par {\b rap fn 3.14159265359 255} |
383 |
\par |
384 |
\par will cause RAP to provide the two best rational approximations to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} with a maximum denominator of 255.{\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 {\cs19\super |
385 |
\chftn } This statement should be qualified somewhat. RAP will not operate on irrational numbers\emdash every number which RAP can accept as input is rational. When using RAP to find rational numbers which are near an |
386 |
irrational, a rational approximation of the irrational must be used (in this case, 3.1415926539 for {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}). RAP will provide the terms of F{\sub 255} |
387 |
which enclose 3.1415926536, which are not required to be the rational numbers which enclose {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} |
388 |
. RAP will provide an incorrect result if and only if there is a term of the Farey series of interest in between the irrational number one is trying to approximate and the rational approximation supplied to RAP. The probability of one getting |
389 |
\ldblquote unlucky\rdblquote in this way increases with a)increasing order of the Farey series, because the terms are, on average, closer together, or b)decreasing precision of the rational number specified to RAP. It is tedious to enter large nu |
390 |
mbers of digits for irrational numbers: commercial symbolic manipulation software such as {\i Mathematica} |
391 |
may provide the ability to calculate arbitrarily many partial quotients of irrational numbers, and so may be more convenient in this regard than RAP.}} |
392 |
\par |
393 |
\par On a Win32 system, invoking RAP in interactive mode will require opening a DOS shell and then invoking the RAP program. |
394 |
\par |
395 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\b Batch Mode.} If RAP is invoked with the single parameter \ldblquote BATCH\rdblquote |
396 |
, it will take input from the standard input stream until end-of-file on the stream, treating each token in the same way it would a command-line parameter. The batch mode allows numbers to be specified |
397 |
which are too long for the operating system to tolerate on the command-line. |
398 |
\par \pard \widctlpar |
399 |
\par \pard \li1080\widctlpar For example, preparing an input file named RAP_IN.TXT with the following contents and invoking RAP with the command line \ldblquote {\f3 rap batch <RAP_IN.TXT}\rdblquote |
400 |
will give the same results as the command-line invocation described above.{\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 {\cs19\super \chftn } On a command line, with many operating systems, \ldblquote <\rdblquote |
401 |
will cause the standard input for the program to be taken from the specified file.}} |
402 |
\par |
403 |
\par \pard \li1440\widctlpar {\f11 fn |
404 |
\par 3.14159265359 |
405 |
\par 255 |
406 |
\par }\pard \li1080\widctlpar |
407 |
\par It is also noteworthy that some computing platforms can be \ldblquote tricked\rdblquote into accepting input from the keyboard which is longer than allowed on a command line. For example, on a Win32 platform, the invocation: |
408 |
\par |
409 |
\par \pard \li1440\widctlpar {\f11 rap batch | more |
410 |
\par }\pard \li1080\widctlpar |
411 |
\par will allow input to be entered from the keyboard (stdin) which is much longer than allowed on the command line, but the input must be terminated with CONTROL-Z. The \ldblquote {\f11 | more}\rdblquote |
412 |
pipelining command causes all output to go to a file before it is displayed, and eliminates display problems due to intermingling of input and output. |
413 |
\par \pard \widctlpar |
414 |
\par Invoking RAP with no parameters will result in a help message. Supplying RAP with unexpected input will result in an error message. |
415 |
\par |
416 |
\par {\*\bkmkstart _Toc498721635}{\pntext\pard\plain\b\i\f5 3.2\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Token Concatenation{\*\bkmkend _Toc498721635} |
417 |
\par \pard\plain \widctlpar \f4\fs20 When preparing an input file for use in the batch mode of RAP, it may occur that a number to be supplied to RAP exceeds a convenient length for a line of text. For this reason, RAP treats the backslash (\ldblquote \\ |
418 |
\rdblquote ) as a token concatenation operator. RAP first parses its input, identifying tokens (groups of letters, digits, and symbols separated by spaces, tabs, and newline characters |
419 |
), then tokens ending in the backslash character are concatenated with the following token. Most readers of this document will have substantial experience with programming languages and scripting languages, so this concept doesn\rquote |
420 |
t need further explanation. |
421 |
\par |
422 |
\par For example, the input file RAP_IN.TXT specified in the example above could be prepared as shown below with no change in RAP\rquote s behavior. |
423 |
\par |
424 |
\par \pard \li720\widctlpar {\f11 f\\ |
425 |
\par n |
426 |
\par 3.14\\ 1592\\ 65\\ |
427 |
\par 359 |
428 |
\par 255 |
429 |
\par }\pard \widctlpar |
430 |
\par Token concatenation is also applied in interactive mode, although this is probably of no practical value. |
431 |
\par |
432 |
\par {\*\bkmkstart _Toc498721636}{\pntext\pard\plain\b\i\f5 3.3\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Case Sensitivity Of RAP{\*\bkmkend _Toc498721636} |
433 |
\par \pard\plain \widctlpar \f4\fs20 RAP is case-insensitive in all input. |
434 |
\par |
435 |
\par However, an operating system may be case-sensitive. In the example above involving batch mode, the command line \ldblquote {\f3 rap batch <rap_in.txt}\ldblquote might not work correctly, as an operating system may treat {\f11 RAP_IN.TXT} |
436 |
as a different file than {\f11 rap_in.txt}. It is the operating system, not RAP, which arranges for redirection of the standard input and output. |
437 |
\par |
438 |
\par {\*\bkmkstart _Toc498721637}{\pntext\pard\plain\b\i\f5 3.4\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Comments In Batch Mode{\*\bkmkend _Toc498721637} |
439 |
\par \pard\plain \widctlpar \f4\fs20 RAP has no provision for comments in the input file when used in batch mode. |
440 |
\par |
441 |
\par {\*\bkmkstart _Toc498721638}{\pntext\pard\plain\b\i\f5 3.5\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Saving RAP Output To A File{\*\bkmkend _Toc498721638} |
442 |
\par \pard\plain \widctlpar \f4\fs20 All RAP output is written to the standard output stream, which is the console by default. To redirect RAP output to a file, include \ldblquote {\f11 >filename}\rdblquote |
443 |
on the command line (Win32 DOS boxes and Unix). Output may be concatenated to a file using \ldblquote {\f11 >>filename}\rdblquote (Win32 DOS boxes and Unix). Output may also be displayed a screen at a time using \ldblquote {\f11 | more}\rdblquote . |
444 |
|
445 |
\par |
446 |
\par {\*\bkmkstart _Toc498721639}{\pntext\pard\plain\b\i\f5 3.6\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Error Behavior Of RAP{\*\bkmkend _Toc498721639} |
447 |
\par \pard\plain \widctlpar \f4\fs20 RAP will respond to errors in five different ways. |
448 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}{\b Input parsing errors.} Some feature of the input command or data violates RAP\rquote |
449 |
s parsing rules (illegal characters, ill-formed numbers, etc.). The diagnostic messages provided in these cases should be adequate to locate the problem. |
450 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Command Template Matching Errors.} RAP contains an internal \ldblquote template\rdblquote |
451 |
table which is a list of all commands and the types of arguments that each will accept. If RAP can parse all input parameters, but can\rquote t match the number and type of parameters to the requested command, RAP will issue a nebulous catchall |
452 |
\ldblquote template matching\rdblquote error message. For example, \ldblquote {\f11 rap gcd 2 2/3}\rdblquote will fail because the \ldblquote gcd\rdblquote command won\rquote t accept a non-integer argument. Similarly, \ldblquote {\f11 rap 2 3 4} |
453 |
\rdblquote will fail because the \ldblquote gcd\rdblquote command can only accept two arguments. |
454 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Context-Sensitive Error Messages.} |
455 |
There are a small number of situations where RAP will issue specific error messages. In these cases, the information provided in the error message should be adequate to understand the nature of the error. |
456 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b NAN.} Any internal calculation in RAP which overflows or produces an undefined result will cause the value of NAN ({\i N}ot {\i A} {\i N} |
457 |
umber) to be assigned to the result. Any operation with NAN as an input will produce NAN as an output (NANs propagate). For example, exponentiating 1000000 to the 1000{\super th} power (\ldblquote rap ** 1000000 1000\rdblquote ) will produce NAN. |
458 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}{\b Assertion Failures.} The source code of RAP is liberally decorated with calls to the function {\i asAssert()}, which behaves similarly to the standard C-language {\i assert()} |
459 |
macro. If an assertion fails, it represents a serious internal software error. Only a line number will be displayed. The source code must be consulted to determine the nature of the error. (An assertion failure is a bug\emdash |
460 |
please report any such failures as bugs.) |
461 |
\par \pard \widctlpar |
462 |
\par {\*\bkmkstart _Toc498721640}{\pntext\pard\plain\b\i\f5 3.7\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Specification Of Integers To RAP{\*\bkmkend _Toc498721640} |
463 |
\par \pard\plain \widctlpar \f4\fs20 An integer is specified as a series of digits 0-9, with an optional leading unary \ldblquote -\ldblquote sign, and optional commas. |
464 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}Commas in integers are simply discarded by RAP. Integers are not parsed |
465 |
to determine if the commas are placed correctly within the integer. Example: \ldblquote 1234\rdblquote , \ldblquote 12,34\rdblquote , \ldblquote 1,234\rdblquote , and \ldblquote 1,,2,,3,,4\rdblquote |
466 |
are treated equivalently by RAP; each represents the integer 1,234. |
467 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}The integer {\i zero} must be specified as a single instance of the digit \ldblquote 0\rdblquote . Multiple instances are illegal. A unary \ldblquote -\ldblquote is illegal. |
468 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}Leading 0\rquote s on non-zero integers are not allowed. |
469 |
\par \pard \widctlpar |
470 |
\par {\*\bkmkstart _Toc498721641}{\pntext\pard\plain\b\i\f5 3.8\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Specification Of Rational Numbers To RAP{\*\bkmkend _Toc498721641} |
471 |
\par \pard\plain \widctlpar \f4\fs20 A rational number may be specified to RAP in two different ways. |
472 |
\par |
473 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1080\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}Two integers separated by a forward slash (\ldblquote /\rdblquote |
474 |
). Rational numbers may never contain whitespace. Only the numerator may contain an optional \lquote -\lquote -sign. |
475 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}A floating-point constant with or without a positive or negative exponent. For example, \_3.121934204e-3 is legal and will be treated internally by RAP as the rational number \_3,121,934,204/1,000,000,000,000.{ |
476 |
\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 {\cs19\super \chftn } This isn\rquote t completely true. RAP will remove any g.c.d. from numerator and denominator before using a rational number internally.}} RAP will also accept \_ |
477 |
0.003121934204 or \_3121934204/1000000000000 and treat it equivalently. |
478 |
\par \pard \widctlpar |
479 |
\par RAP will not accept other intuitively plausible specifications of rational numbers. For example, RAP\rquote s parser will not accept 1e30/5. |
480 |
\par |
481 |
\par \page |
482 |
\par {\*\bkmkstart _Toc498721642}{\pntext\pard\plain\b\f5\fs28\kerning28 4.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 Detailed Descriptions Of Commands{\*\bkmkend _Toc498721642} |
483 |
|
484 |
\par \pard\plain \widctlpar \f4\fs20 |
485 |
Commands are polymorphic in that RAP will differentiate between integers and rational numbers and may use slightly different algorithms or format results differently depending on whether input arguments are integers or rational numbers. Note that every i |
486 |
nteger is a rational number, so RAP will always accept integers where rational numbers are specified. RAP will also accept rational numbers where integers are required, if the rational number reduces to an integer. |
487 |
\par |
488 |
\par {\*\bkmkstart _Toc498721643}{\pntext\pard\plain\b\i\f5 4.1\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Sum [+]{\*\bkmkend _Toc498721643} |
489 |
\par \pard\plain \widctlpar \f4\fs20 |
490 |
\par {\*\bkmkstart _Toc498721644}{\pntext\pard\plain\f5 4.1.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721644} |
491 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap + I1 I2 |
492 |
\par }\pard \li720\widctlpar Adds integer I1 to integer I2 to produce an integer result. |
493 |
\par \pard \widctlpar |
494 |
\par {\*\bkmkstart _Toc498721645}{\pntext\pard\plain\f5 4.1.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721645} |
495 |
\par \pard\plain \widctlpar \f4\fs20 Adds integers to produce an integer result. The algorithm applied is addition of ASCII digits. |
496 |
\par |
497 |
\par {\*\bkmkstart _Toc498721646}{\pntext\pard\plain\f5 4.1.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721646} |
498 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to add two large integers is reproduced below. |
499 |
\par |
500 |
\par {\f11\fs16 C:\\>rap + 3,142,991,002 7,934,333 |
501 |
\par ------------------------------------------------------------------------------ |
502 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
503 |
\par ------------------------------------------------------------------------------ |
504 |
\par arg1: 3,142,991,002 ( 10 digits) |
505 |
\par ------------------------------------------------------------------------------ |
506 |
\par arg2: 7,934,333 ( 7 digits) |
507 |
\par ------------------------------------------------------------------------------ |
508 |
\par arg1 + arg2: 3,150,925,335 ( 10 digits) |
509 |
\par ------------------------------------------------------------------------------ |
510 |
\par RAP execution ends. |
511 |
\par ------------------------------------------------------------------------------} |
512 |
\par |
513 |
\par \page |
514 |
\par {\*\bkmkstart _Toc498721647}{\pntext\pard\plain\b\i\f5 4.2\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Difference [-]{\*\bkmkend _Toc498721647} |
515 |
\par \pard\plain \widctlpar \f4\fs20 |
516 |
\par {\*\bkmkstart _Toc498721648}{\pntext\pard\plain\f5 4.2.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721648} |
517 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap - I1 I2 |
518 |
\par }\pard \li720\widctlpar Subtracts integer I2 from integer I1 to produce an integer result. |
519 |
\par |
520 |
\par {\*\bkmkstart _Toc498721649}{\pntext\pard\plain\f5 4.2.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721649} |
521 |
\par \pard\plain \widctlpar \f4\fs20 Subtracts integers to produce an integer result. The algorithm applied is subtraction of ASCII digits. |
522 |
\par |
523 |
\par {\*\bkmkstart _Toc498721650}{\pntext\pard\plain\f5 4.2.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721650} |
524 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to subtract two large integers is reproduced below. |
525 |
\par |
526 |
\par {\f11\fs16 C:\\>rap - -343926469248723687426946 284622838352848 |
527 |
\par ------------------------------------------------------------------------------ |
528 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
529 |
\par ------------------------------------------------------------------------------ |
530 |
\par arg1: - 343,926,469,248,723,687,426,946 ( 24 digits) |
531 |
\par ------------------------------------------------------------------------------ |
532 |
\par arg2: 284,622,838,352,848 ( 15 digits) |
533 |
\par ------------------------------------------------------------------------------ |
534 |
\par arg1 - arg2: - 343,926,469,533,346,525,779,794 ( 24 digits) |
535 |
\par ------------------------------------------------------------------------------ |
536 |
\par RAP execution ends. |
537 |
\par ------------------------------------------------------------------------------} |
538 |
\par |
539 |
\par \page |
540 |
\par {\*\bkmkstart _Toc498721651}{\pntext\pard\plain\b\i\f5 4.3\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Product [*]{\*\bkmkend _Toc498721651} |
541 |
\par \pard\plain \widctlpar \f4\fs20 |
542 |
\par {\*\bkmkstart _Toc498721652}{\pntext\pard\plain\f5 4.3.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721652} |
543 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap * I1 I2 |
544 |
\par }\pard \li720\widctlpar Multiplies integer I1 by integer I2 to produce an integer result. |
545 |
\par {\*\bkmkstart _Toc498721653}{\pntext\pard\plain\f5 4.3.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721653} |
546 |
\par \pard\plain \widctlpar \f4\fs20 Multiplies integers to produce an integer result. The algorithm used is essentially long-hand multiplication of ASCII digits (multiplication by a single digit, shifting, addition). |
547 |
\par |
548 |
\par {\*\bkmkstart _Toc498721654}{\pntext\pard\plain\f5 4.3.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721654} |
549 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to multiply two large integers is reproduced below. |
550 |
\par |
551 |
\par {\f11\fs16 C:\\>rap * -294328649236462394616946 826482348525 |
552 |
\par ------------------------------------------------------------------------------ |
553 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
554 |
\par ------------------------------------------------------------------------------ |
555 |
\par arg1: - 294,328,649,236,462,394,616,946 ( 24 digits) |
556 |
\par ------------------------------------------------------------------------------ |
557 |
\par arg2: 826,482,348,525 ( 12 digits) |
558 |
\par ------------------------------------------------------------------------------ |
559 |
\par arg1 * arg2: - 243,257,433, ( 36 digits) |
560 |
\par 259,142,387,965,858,847,843,104,650 |
561 |
\par ------------------------------------------------------------------------------ |
562 |
\par RAP execution ends. |
563 |
\par ------------------------------------------------------------------------------} |
564 |
\par |
565 |
\par |
566 |
\par \page |
567 |
\par {\*\bkmkstart _Toc498721655}{\pntext\pard\plain\b\i\f5 4.4\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Quotient [/]{\*\bkmkend _Toc498721655} |
568 |
\par \pard\plain \widctlpar \f4\fs20 |
569 |
\par {\*\bkmkstart _Toc498721656}{\pntext\pard\plain\f5 4.4.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721656} |
570 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap / I1 I2 |
571 |
\par }\pard \li720\widctlpar Divides integer I1 by non-zero integer I2 to produce an integer result. |
572 |
\par \pard \widctlpar |
573 |
\par {\*\bkmkstart _Toc498721657}{\pntext\pard\plain\f5 4.4.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721657} |
574 |
\par \pard\plain \widctlpar \f4\fs20 Divides two integers to produce an integer quotient. The result produced is specified by the equation below. The algorithm is long-hand division of ASCII digits (shifting, trial subtraction). |
575 |
\par |
576 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw1460\objh680{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
577 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
578 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
579 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
580 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
581 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
582 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
583 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
584 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
585 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a006 |
586 |
1cdf674dc00103000000800400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
587 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
588 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
589 |
000000000000000000000000030000007002000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c000000feffffff0e000000fefffffffeffffff11000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
590 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
591 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
592 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
593 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c00000000000000000008000f0a0000af040000b4050000a80200000000 |
594 |
0000000000000000000000000000e8030000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000f0aaf0400000100090000033301000003001500000000000500 |
595 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400420091200000026060f001a00ffffffff000010000000c0ffffffb8ffffffe0080000f80300000b00000026060f000c004d617468547970650000e00009000000 |
596 |
fa02000010000000000000002200040000002d0100000500000014022002760605000000130220021e0810000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03360801000000fa0008000000320ada03360801000000fb0008000000320aaa0136080100 |
597 |
0000fa0008000000320a1a03d40501000000ea0008000000320ada03d40501000000eb0008000000320aaa01d40501000000ea0008000000320a80027e04010000003d0015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000a9040000002d01020004000000f0010100 |
598 |
08000000320aac03500701000000320008000000320a8e014a070100000031000a000000320a80023a0006000000526573756c7415000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000a9040000002d01010004000000f001020008000000320aac039c06010000004900 |
599 |
08000000320a8e01c0060100000049000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f00101000300000000001500000000000000000000000000000000000100feff030a0000ffffffff02ce02000000 |
600 |
0000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f6e2e3300f439b271000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000 |
601 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
602 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000d000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
603 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
604 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000001000000074000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
605 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000020006e55800000000000000409e4900a08e49000000000003010103010a010281520002816500028173000281750002816c000281740002863d00029804eb029804 |
606 |
ef0306000001030e0000011283490002883100000112834900028832000000000296f0f80296fbf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
607 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
608 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
609 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw2575\pich1199\picwgoal1460\pichgoal680 |
610 |
010009000003330100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400420091200000026060f001a00ffffffff000010000000c0ffffffb8ffffffe0080000f80300000b00000026060f |
611 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d0100000500000014022002760605000000130220021e0810000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03360801000000fa0008000000320ada033608 |
612 |
01000000fb0008000000320aaa01360801000000fa0008000000320a1a03d40501000000ea0008000000320ada03d40501000000eb0008000000320aaa01d40501000000ea0008000000320a80027e04010000003d0015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000 |
613 |
a9040000002d01020004000000f001010008000000320aac03500701000000320008000000320a8e014a070100000031000a000000320a80023a0006000000526573756c7415000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000a9040000002d01010004000000f0010200 |
614 |
08000000320aac039c0601000000490008000000320a8e01c0060100000049000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f0010100030000000000150000000001003634310000000000270000000000 |
615 |
0100000000000180000000000100ffffff0000000000ffffff000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000ffffff00ffffff00bd077d000200db00ffffff0000000000ffffff00ffffff00ffffff00ffffff}}}}} |
616 |
\par \pard \widctlpar |
617 |
\par {\*\bkmkstart _Toc498721658}{\pntext\pard\plain\f5 4.4.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721658} |
618 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to divide two large integers is reproduced below. Note that the remainder is also supplied. |
619 |
\par |
620 |
\par {\f11\fs16 C:\\>rap / 9274639462975692736497259623964932 287463864289 |
621 |
\par ------------------------------------------------------------------------------ |
622 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
623 |
\par ------------------------------------------------------------------------------ |
624 |
\par dividend: 9,274,639, ( 34 digits) |
625 |
\par 462,975,692,736,497,259,623,964,932 |
626 |
\par ------------------------------------------------------------------------------ |
627 |
\par divisor: 287,463,864,289 ( 12 digits) |
628 |
\par ------------------------------------------------------------------------------ |
629 |
\par dividend % divisor: 275,260,681,237 ( 12 digits) |
630 |
\par ------------------------------------------------------------------------------ |
631 |
\par dividend / divisor: 32,263,670,725,762,915,010,255 ( 23 digits) |
632 |
\par ------------------------------------------------------------------------------ |
633 |
\par RAP execution ends. |
634 |
\par ------------------------------------------------------------------------------} |
635 |
\par |
636 |
\par \page |
637 |
\par {\*\bkmkstart _Toc498721659}{\pntext\pard\plain\b\i\f5 4.5\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Remainder [%]{\*\bkmkend _Toc498721659} |
638 |
\par \pard\plain \widctlpar \f4\fs20 |
639 |
\par {\*\bkmkstart _Toc498721660}{\pntext\pard\plain\f5 4.5.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721660} |
640 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap % I1 I2 |
641 |
\par }\pard \li720\widctlpar Divides integer I1 by non-zero integer I2 to produce an integer remainder. |
642 |
\par \pard \widctlpar |
643 |
\par {\*\bkmkstart _Toc498721661}{\pntext\pard\plain\f5 4.5.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721661} |
644 |
\par \pard\plain \widctlpar \f4\fs20 RAP will divide two integers to produce an integer remainder (the modulo remainder function). The result produced is specified by the equation below. The algorithm employed is long-hand division of ASCII digits. |
645 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw2180\objh680{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
646 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
647 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
648 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
649 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
650 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
651 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
652 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
653 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
654 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a006 |
655 |
1cdf674dc00103000000000500000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
656 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
657 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
658 |
00000000000000000000000003000000c002000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c0000000d000000feffffff0f000000fefffffffeffffff1200000013000000feffffffffffffffffffffffffffffffffffffffffffffffffff |
659 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
660 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
661 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
662 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800050f0000af04000084080000a80200000000 |
663 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800050faf0400000100090000035b01000003001500000000000500 |
664 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c024004a00d1200000026060f001a00ffffffff000010000000c0ffffffb8ffffff600d0000f80300000b00000026060f000c004d617468547970650000e00009000000 |
665 |
fa02000010000000000000002200040000002d0100000500000014022002f60a05000000130220029e0c10000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03b60c01000000fa0008000000320ada03b60c01000000fb0008000000320aaa01b60c0100 |
666 |
0000fa0008000000320a1a03540a01000000ea0008000000320ada03540a01000000eb0008000000320aaa01540a01000000ea0008000000320a80023607010000002d0008000000320a80027e04010000003d0015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e000081 |
667 |
040000002d01020004000000f001010008000000320aac03d00b01000000320008000000320a8e01ca0b01000000310008000000320a8002160901000000320008000000320a80024c060100000031000a000000320a80023a0006000000526573756c7415000000fb0280fe000000000000900101000000040200105469 |
668 |
6d6573204e657720526f6d616e000081040000002d01010004000000f001020008000000320aac031c0b01000000490008000000320a8e01400b01000000490008000000320a8002620801000000490008000000320a8002c2050100000049000a00000026060f000a00ffffffff01000000000010000000fb0210000700 |
669 |
00000000bc02000000000102022253797374656d0000040000002d01020004000000f001010003000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174 |
670 |
696f6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
671 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000e000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
672 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000001000000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
673 |
ffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000110000008c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
674 |
ffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200 |
675 |
06e5700000000000000078814900a08349000000000003010103010a010281520002816500028173000281750002816c000281740002863d001283490002883100028612221283490002883200029804eb029808ef0306000001030e0000011283490002883100000112834900028832000000000296f0f80296fbf80002 |
676 |
9804ef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
677 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
678 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw3845\pich1199\picwgoal2180\pichgoal680 |
679 |
0100090000035b0100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c024004a00d1200000026060f001a00ffffffff000010000000c0ffffffb8ffffff600d0000f80300000b00000026060f |
680 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d0100000500000014022002f60a05000000130220029e0c10000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03b60c01000000fa0008000000320ada03b60c |
681 |
01000000fb0008000000320aaa01b60c01000000fa0008000000320a1a03540a01000000ea0008000000320ada03540a01000000eb0008000000320aaa01540a01000000ea0008000000320a80023607010000002d0008000000320a80027e04010000003d0015000000fb0280fe0000000000009001000000000402001054 |
682 |
696d6573204e657720526f6d616e000081040000002d01020004000000f001010008000000320aac03d00b01000000320008000000320a8e01ca0b01000000310008000000320a8002160901000000320008000000320a80024c060100000031000a000000320a80023a0006000000526573756c7415000000fb0280fe0000 |
683 |
000000009001010000000402001054696d6573204e657720526f6d616e000081040000002d01010004000000f001020008000000320aac031c0b01000000490008000000320a8e01400b01000000490008000000320a8002620801000000490008000000320a8002c2050100000049000a00000026060f000a00ffffffff01 |
684 |
000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f001010003000000000000000000000000000000000000000000000000ffffff000000000000000000ffffff00ffffff000000000000000000ffffff00ffffff0000000000ffffff00ffffff0000 |
685 |
000000650002000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000000000000000000000000000}}}}} |
686 |
\par \pard \widctlpar |
687 |
\par {\*\bkmkstart _Toc498721662}{\pntext\pard\plain\f5 4.5.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721662} |
688 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to divide two large integers and thereby produce the integer remainder is reproduced below. Note that the quotient is also supplied. |
689 |
\par |
690 |
\par {\f11\fs16 C:\\>rap % 987243769234692364923 23984236496 |
691 |
\par ------------------------------------------------------------------------------ |
692 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
693 |
\par ------------------------------------------------------------------------------ |
694 |
\par dividend: 987,243,769,234,692,364,923 ( 21 digits) |
695 |
\par ------------------------------------------------------------------------------ |
696 |
\par divisor: 23,984,236,496 ( 11 digits) |
697 |
\par ------------------------------------------------------------------------------ |
698 |
\par dividend / divisor: 41,162,192,901 ( 11 digits) |
699 |
\par ------------------------------------------------------------------------------ |
700 |
\par dividend % divisor: 3,136,050,027 ( 10 digits) |
701 |
\par ------------------------------------------------------------------------------ |
702 |
\par RAP execution ends. |
703 |
\par ------------------------------------------------------------------------------ |
704 |
\par } |
705 |
\par \page |
706 |
\par {\*\bkmkstart _Ref497419035}{\*\bkmkstart _Toc498721663}{\pntext\pard\plain\b\i\f5 4.6\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Integer Raised To An Integer Power [**]{\*\bkmkend _Ref497419035} |
707 |
{\*\bkmkend _Toc498721663} |
708 |
\par \pard\plain \widctlpar \f4\fs20 |
709 |
\par {\*\bkmkstart _Toc498721664}{\pntext\pard\plain\f5 4.6.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721664} |
710 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap ** I1 I2 |
711 |
\par }\pard \li720\widctlpar Raises integer I1 to the power of non-negative integer I2. |
712 |
\par \pard \widctlpar |
713 |
\par {\*\bkmkstart _Toc498721665}{\pntext\pard\plain\f5 4.6.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721665} |
714 |
\par \pard\plain \widctlpar \f4\fs20 RAP will exponentiate a non-negative integer to a positive integral value, according to the equation below. |
715 |
\par |
716 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw1359\objh360{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
717 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
718 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
719 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
720 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
721 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
722 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
723 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
724 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
725 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a006 |
726 |
1cdf674dc00103000000800400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
727 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
728 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
729 |
000000000000000000000000030000005402000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c000000feffffff0e000000fefffffffeffffff11000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
730 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
731 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
732 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
733 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c00000000000000000008005e0900007b0200004f050000680100000000 |
734 |
0000000000000000000000000000e8030000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008005e097b0200000100090000032601000002001500000000000500 |
735 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400280081200000026060f001a00ffffffff000010000000c0ffffffb7ffffff40080000f70100000b00000026060f000c004d617468547970650000500015000000 |
736 |
fb0220ff0000000000009001000000000402001054696d6573204e657720526f6d616e0000d3040000002d01000008000000320af400850701000000320015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000d3040000002d01010004000000f001000008000000320a |
737 |
a0014c060100000031000a000000320aa0013a0006000000526573756c7415000000fb0220ff0000000000009001010000000402001054696d6573204e657720526f6d616e0000d3040000002d01000004000000f001010008000000320af4000f0701000000490015000000fb0280fe0000000000009001010000000402 |
738 |
001054696d6573204e657720526f6d616e0000d3040000002d01010004000000f001000008000000320aa001c20501000000490010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01000004000000f001010008000000320aa0017e04010000003d000a00000026060f000a00 |
739 |
ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01010004000000f001000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce02000000 |
740 |
0000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f6e2e3300f439b271000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000 |
741 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
742 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000d000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
743 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
744 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000001000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
745 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000020006e54400000000000000989c4900c09c49000000000003010103010a010281520002816500028173000281750002816c000281740002863d0012834900028831 |
746 |
00030f00000b1101128349000288320000000a029804ef00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
747 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
748 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
749 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn10 {\pict\wmetafile8\picw2398\pich635\picwgoal1359\pichgoal360 |
750 |
010009000003260100000200150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400280081200000026060f001a00ffffffff000010000000c0ffffffb7ffffff40080000f70100000b00000026060f |
751 |
000c004d617468547970650000500015000000fb0220ff0000000000009001000000000402001054696d6573204e657720526f6d616e0000d3040000002d01000008000000320af400850701000000320015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000d304000000 |
752 |
2d01010004000000f001000008000000320aa0014c060100000031000a000000320aa0013a0006000000526573756c7415000000fb0220ff0000000000009001010000000402001054696d6573204e657720526f6d616e0000d3040000002d01000004000000f001010008000000320af4000f0701000000490015000000fb |
753 |
0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000d3040000002d01010004000000f001000008000000320aa001c20501000000490010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01000004000000f001010008000000320aa0017e04 |
754 |
010000003d000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01010004000000f00100000300000000000000000000000000000000000000000000006200000000000000000000343937000000000000000000000000000000 |
755 |
00000222020000000000000000000276020000000000ffffff0000000000ffffff00ffffff00ffffff00000000000000000000000000321325000000000040958c00000000000000000000000000000000}}}}} |
756 |
\par \pard \widctlpar |
757 |
\par The algorithm applied is to examine the bit pattern of the exponent and to repeatedly square the argument and to selectively multiply in the repeated square. For example, I1{\super 5} can be rewritten as (I1{\super 4})(I1{\super 1} |
758 |
), and calculated using the following steps: |
759 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}\pard \fi-360\li1800\widctlpar{\*\pn \pnlvlblt\pnf1\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}multiplier := I1 |
760 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}result := 1 |
761 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}result := result * multiplier |
762 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}multiplier := multiplier * multiplier |
763 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}multiplier := multiplier * multiplier |
764 |
\par {\pntext\pard\plain\f1\fs20 \'b7\tab}result := result * multiplier |
765 |
\par \pard \widctlpar |
766 |
\par {\*\bkmkstart _Toc498721666}{\pntext\pard\plain\f5 4.6.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721666} |
767 |
\par \pard\plain \widctlpar \f4\fs20 |
768 |
\par {\f11\fs16 C:\\>rap ** 117 54 |
769 |
\par ------------------------------------------------------------------------------ |
770 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
771 |
\par ------------------------------------------------------------------------------ |
772 |
\par arg: 117 ( 3 digits) |
773 |
\par ------------------------------------------------------------------------------ |
774 |
\par exponent: 54 ( 2 digits) |
775 |
\par ------------------------------------------------------------------------------ |
776 |
\par arg ** exponent: 4,808, ( 112 digits) |
777 |
\par 797,999,524,921,631,067,632,458,892, |
778 |
\par 309,152,880,430,748,856,242,309,594, |
779 |
\par 970,691,360,198,993,667,007,419,994, |
780 |
\par 123,210,723,254,173,781,195,143,529 |
781 |
\par ------------------------------------------------------------------------------ |
782 |
\par RAP execution ends. |
783 |
\par ------------------------------------------------------------------------------ |
784 |
\par } |
785 |
\par \page |
786 |
\par {\*\bkmkstart _Toc498721667}{\pntext\pard\plain\b\i\f5 4.7\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Greatest Common Divisor [GCD]{\*\bkmkend _Toc498721667} |
787 |
\par \pard\plain \widctlpar \f4\fs20 |
788 |
\par {\*\bkmkstart _Toc498721668}{\pntext\pard\plain\f5 4.7.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721668} |
789 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap gcd I1 I2 |
790 |
\par }\pard \li720\widctlpar Calculates the g.c.d. of positive integers I1 and I2 using Euclid\rquote s algorithm. |
791 |
\par \pard \widctlpar |
792 |
\par {\*\bkmkstart _Toc498721669}{\pntext\pard\plain\f5 4.7.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721669} |
793 |
\par \pard\plain \widctlpar \f4\fs20 Calculates the greatest common divisor of two positive integers using Euclid\rquote s algorithm. Euclid\rquote s algorithm and its proof are not discussed explicitly in the TOMS paper. Olds\rquote |
794 |
CF book explains the relationship between Euclid\rquote s algorithm and the apparatus of continued fractions, and supplies a proof. A search of the web would also reveal many pages that discuss Euclid\rquote s g.c.d. algorithm in great detail. |
795 |
\par |
796 |
\par {\*\bkmkstart _Toc498721670}{\pntext\pard\plain\f5 4.7.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721670} |
797 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to calculate the g.c.d. of two integers is reproduced below. |
798 |
\par |
799 |
\par {\f11\fs16 C:\\ >rap gcd 13433 34048 |
800 |
\par ------------------------------------------------------------------------------ |
801 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
802 |
\par ------------------------------------------------------------------------------ |
803 |
\par arg1: 13,433 ( 5 digits) |
804 |
\par ------------------------------------------------------------------------------ |
805 |
\par arg2: 34,048 ( 5 digits) |
806 |
\par ------------------------------------------------------------------------------ |
807 |
\par gcd(arg1, arg2): 133 ( 3 digits) |
808 |
\par ------------------------------------------------------------------------------ |
809 |
\par RAP execution ends. |
810 |
\par ------------------------------------------------------------------------------ |
811 |
\par } |
812 |
\par \page |
813 |
\par {\*\bkmkstart _Ref497594880}{\*\bkmkstart _Toc498721671}{\pntext\pard\plain\b\i\f5 4.8\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Decimal Approximation [DAP]{\*\bkmkend _Ref497594880} |
814 |
{\*\bkmkend _Toc498721671} |
815 |
\par \pard\plain \widctlpar \f4\fs20 |
816 |
\par {\*\bkmkstart _Toc498721672}{\pntext\pard\plain\f5 4.8.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721672} |
817 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap dap R1 |
818 |
\par }\pard \li720\widctlpar Performs long division on a rational number R1 to obtain the more familiar decimal approximation. By default, four lines ({{\field{\*\fldinst SYMBOL 187 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} |
819 |
100) of significant figures beyond the decimal point are displayed. |
820 |
\par \pard \widctlpar {\b rap dap R1 D} |
821 |
\par \pard \li720\widctlpar Displays R1 as a rational approximation with D as the denominator.{\b |
822 |
\par }\pard \widctlpar |
823 |
\par {\*\bkmkstart _Toc498721673}{\pntext\pard\plain\f5 4.8.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721673} |
824 |
\par \pard\plain \widctlpar \f4\fs20 The DAP command provides crude functionality to display a more familiar and intuitive decimal approximation of a rational number. |
825 |
\par |
826 |
\par Let h/k be the rational number to be displayed in a more familiar form, and let N/D be an approximation to h/k such that: |
827 |
\par |
828 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw1520\objh620{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
829 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
830 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
831 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
832 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
833 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
834 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
835 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
836 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
837 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000c0a7 |
838 |
23df674dc00103000000800400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
839 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
840 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
841 |
000000000000000000000000030000007402000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c000000feffffff0e000000fefffffffeffffff11000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
842 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
843 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
844 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
845 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800790a000045040000f00500006c0200000000 |
846 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800790a450400000100090000033501000003001500000000000500 |
847 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02e00380091200000026060f001a00ffffffff000010000000c0ffffffb8ffffff40090000980300000b00000026060f000c004d617468547970650000c00009000000 |
848 |
fa02000010000000000000002200040000002d010000050000001402000240000500000013020002a60105000000140200025003050000001302000244040500000014020002ee0505000000130200023a0915000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000870400 |
849 |
00002d01010008000000320a8c03100701000000440008000000320a6e011a06010000004e0008000000320a8c036a03010000006b0008000000320a6e016d0301000000680008000000320a8c036f0001000000440008000000320a6e016c00010000004e0015000000fb0280fe00000000000090010000000004020010 |
850 |
54696d6573204e657720526f6d616e000087040000002d01020004000000f001010008000000320a6e018a0801000000310010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010004000000f001020008000000320a6e018e07010000002b0008000000320a6002b0040100 |
851 |
00003c0008000000320a6002120201000000a3000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f001010003000000000000000000000000000000000000000100feff030a0000ffffffff02ce02000000 |
852 |
0000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f6e2e3300f439b271000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000 |
853 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
854 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000d000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
855 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
856 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000001000000068000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
857 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200b2d84c00000000000000246e4900207a49000000000003010103010a01030e00000112834e00000112834400000002866422030e00000112836800000112836b |
858 |
00000002863c00030e00000112834e0002862b0002883100000112834400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
859 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
860 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
861 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn24 {\pict\wmetafile8\picw2681\pich1093\picwgoal1520\pichgoal620 |
862 |
010009000003350100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02e00380091200000026060f001a00ffffffff000010000000c0ffffffb8ffffff40090000980300000b00000026060f |
863 |
000c004d617468547970650000c00009000000fa02000010000000000000002200040000002d010000050000001402000240000500000013020002a60105000000140200025003050000001302000244040500000014020002ee0505000000130200023a0915000000fb0280fe000000000000900101000000040200105469 |
864 |
6d6573204e657720526f6d616e000087040000002d01010008000000320a8c03100701000000440008000000320a6e011a06010000004e0008000000320a8c036a03010000006b0008000000320a6e016d0301000000680008000000320a8c036f0001000000440008000000320a6e016c00010000004e0015000000fb0280 |
865 |
fe0000000000009001000000000402001054696d6573204e657720526f6d616e000087040000002d01020004000000f001010008000000320a6e018a0801000000310010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010004000000f001020008000000320a6e018e070100 |
866 |
00002b0008000000320a6002b004010000003c0008000000320a6002120201000000a3000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f001010003000000000000000000000000000000000000a0000000 |
867 |
000000400000c903c900c903c900ffffff0000000000000000000101000000000000000000000000000088450000370d5f000000000038343800000000000000000000000000000000}}}}} |
868 |
\par \pard \widctlpar |
869 |
\par The choice of N given below will meet this inequality. |
870 |
\par |
871 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw1080\objh680{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
872 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
873 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
874 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
875 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
876 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
877 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
878 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
879 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
880 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000c0a7 |
881 |
23df674dc00103000000400400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
882 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
883 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
884 |
000000000000000000000000030000001802000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b000000feffffff0d000000fefffffffeffffff10000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
885 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
886 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
887 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
888 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c000000000000000000080071070000af04000038040000a80200000000 |
889 |
0000000000000000000000000000e8030000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008007107af0400000100090000030401000003001500000000000500 |
890 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c024004c0061200000026060f001a00ffffffff000010000000c0ffffffb8ffffff80060000f80300000b00000026060f000c004d617468547970650000e00009000000 |
891 |
fa02000010000000000000002200040000002d0100000500000014022002b8030500000013022002c60510000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03de0501000000fa0008000000320ada03de0501000000fb0008000000320aaa01de050100 |
892 |
0000fa0008000000320a1a03160301000000ea0008000000320ada03160301000000eb0008000000320aaa01160301000000ea0008000000320a8002d801010000003d0015000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000b0040000002d01020004000000f0010100 |
893 |
08000000320aac035f04010000006b0008000000320a8e01de0302000000446808000000320a80024c00010000004e000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01010004000000f001020003000000000000000000 |
894 |
788e4900000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f |
895 |
6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200b2d83800000000000000 |
896 |
5c9d49008c6f49000000000003010103010a0112834e0002863d000306000001030e0000011283440012836800000112010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
897 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000c000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
898 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000e00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
899 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000054000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
900 |
ffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000836b000000000296f0f80296fbf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
901 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
902 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
903 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
904 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw1905\pich1199\picwgoal1080\pichgoal680 |
905 |
010009000003040100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c024004c0061200000026060f001a00ffffffff000010000000c0ffffffb8ffffff80060000f80300000b00000026060f |
906 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d0100000500000014022002b8030500000013022002c60510000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010008000000320a1a03de0501000000fa0008000000320ada03de05 |
907 |
01000000fb0008000000320aaa01de0501000000fa0008000000320a1a03160301000000ea0008000000320ada03160301000000eb0008000000320aaa01160301000000ea0008000000320a8002d801010000003d0015000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e0000 |
908 |
b0040000002d01020004000000f001010008000000320aac035f04010000006b0008000000320a8e01de0302000000446808000000320a80024c00010000004e000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d0101000400 |
909 |
0000f001020003000000000000000000788e490000000000000000000002010000ffffff0000400000060f000000ffff00ffffff0000000000000000000210000000000000000000000000000071000000000000006d000000d002d000010200000000000001010000000000}}}}} |
910 |
\par \pard \widctlpar |
911 |
\par DAP operates by accepting h, k, and D as i |
912 |
nput parameters, and choosing N as specified above. Note that if D is chosen to be a power of ten, the digits of N will give the decimal form of a rational number, where the last digit will be truncated rather than rounded (note the form of the inequalit |
913 |
y above). |
914 |
\par |
915 |
\par DAP is described as crude because it is up to the user of RAP to put the decimal point in the right place, and because it will not truncate trailing zeros or round. |
916 |
\par |
917 |
\par The power of ten specified effectively sets the \ldblquote number of decimal places\rdblquote that |
918 |
the decimal approximation is displayed to. A value of D=1e2 will display two decimal places, a value of 1e100 will display 100 decimal places, etc. It would be possible to specify D as other than a power of ten, and in some cases this may be give useful |
919 |
information. For example, in microcontroller work, if one is performing h/2{\super q} scaling, choosing D=2{\super q} would give the required value of h. |
920 |
\par |
921 |
\par |
922 |
\par {\*\bkmkstart _Toc498721674}{\pntext\pard\plain\f5 4.8.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721674} |
923 |
\par \pard\plain \widctlpar \f4\fs20 Output from the DAP command when applied to the rational number 2,043,926/7 is reproduced below. Note that the default choice of D is 10{\super 108} |
924 |
(the right length so that the imaginary decimal point occurs between lines, which allows easier interpretation). From that output below, it can be seen that 2,043,926/7 {{\field{\*\fldinst SYMBOL 187 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} |
925 |
291,989.428571428571\'85 . |
926 |
\par |
927 |
\par {\f11\fs16 C:\\>rap dap 2043926/7} |
928 |
\par {\f11\fs16 ------------------------------------------------------------------------------ |
929 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
930 |
\par ------------------------------------------------------------------------------ |
931 |
\par arg_h: 2,043,926 ( 7 digits) |
932 |
\par ------------------------------------------------------------------------------ |
933 |
\par arg_k: 7 ( 1 digit) |
934 |
\par ------------------------------------------------------------------------------ |
935 |
\par N: 291,989, ( 114 digits) |
936 |
\par 428,571,428,571,428,571,428,571,428, |
937 |
\par 571,428,571,428,571,428,571,428,571, |
938 |
\par 428,571,428,571,428,571,428,571,428, |
939 |
\par 571,428,571,428,571,428,571,428,571 |
940 |
\par ------------------------------------------------------------------------------ |
941 |
\par D: 1, ( 109 digits) |
942 |
\par 000,000,000,000,000,000,000,000,000, |
943 |
\par 000,000,000,000,000,000,000,000,000, |
944 |
\par 000,000,000,000,000,000,000,000,000, |
945 |
\par 000,000,000,000,000,000,000,000,000 |
946 |
\par ------------------------------------------------------------------------------ |
947 |
\par RAP execution ends. |
948 |
\par ------------------------------------------------------------------------------ |
949 |
\par } |
950 |
\par The value of D used can be changed by invoking DAP with a third parameter, as shown in the output below. In the output below, 216 decimal places are displayed. |
951 |
\par |
952 |
\par {\f11\fs16 C:\\>rap dap 2043926/7 1e216 |
953 |
\par ------------------------------------------------------------------------------ |
954 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
955 |
\par ------------------------------------------------------------------------------ |
956 |
\par arg_h: 2,043,926 ( 7 digits) |
957 |
\par ------------------------------------------------------------------------------ |
958 |
\par arg_k: 7 ( 1 digit) |
959 |
\par ------------------------------------------------------------------------------ |
960 |
\par N: 291,989, ( 222 digits) |
961 |
\par 428,571,428,571,428,571,428,571,428, |
962 |
\par 571,428,571,428,571,428,571,428,571, |
963 |
\par 428,571,428,571,428,571,428,571,428, |
964 |
\par 571,428,571,428,571,428,571,428,571, |
965 |
\par 428,571,428,571,428,571,428,571,428, |
966 |
\par 571,428,571,428,571,428,571,428,571, |
967 |
\par 428,571,428,571,428,571,428,571,428, |
968 |
\par 571,428,571,428,571,428,571,428,571 |
969 |
\par ------------------------------------------------------------------------------ |
970 |
\par D: 1, ( 217 digits) |
971 |
\par 000,000,000,000,000,000,000,000,000, |
972 |
\par 000,000,000,000,000,000,000,000,000, |
973 |
\par 000,000,000,000,000,000,000,000,000, |
974 |
\par 000,000,000,000,000,000,000,000,000, |
975 |
\par 000,000,000,000,000,000,000,000,000, |
976 |
\par 000,000,000,000,000,000,000,000,000, |
977 |
\par 000,000,000,000,000,000,000,000,000, |
978 |
\par 000,000,000,000,000,000,000,000,000 |
979 |
\par ------------------------------------------------------------------------------ |
980 |
\par RAP execution ends. |
981 |
\par ------------------------------------------------------------------------------ |
982 |
\par } |
983 |
\par Finally, DAP can also be used to with denominators not an integral power of 10. In the example invocation below, DAP is invoked with a denominator of 2{\super 16}=65536. The output below shows that (for microcontro |
984 |
ller work), if a rational approximation were performed by multiplying by an integer and shifting right a number of bits, using a multiplier of 28,036 and then shifting right by 16 bits would be a good approximation of 3/7. |
985 |
\par |
986 |
\par {\f11\fs16 ------------------------------------------------------------------------------ |
987 |
\par RAP execution ends. |
988 |
\par ------------------------------------------------------------------------------ |
989 |
\par |
990 |
\par C:\\>rap dap 3/7 65536 |
991 |
\par ------------------------------------------------------------------------------ |
992 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
993 |
\par ------------------------------------------------------------------------------ |
994 |
\par arg_h: 3 ( 1 digit) |
995 |
\par ------------------------------------------------------------------------------ |
996 |
\par arg_k: 7 ( 1 digit) |
997 |
\par ------------------------------------------------------------------------------ |
998 |
\par N: 28,086 ( 5 digits) |
999 |
\par ------------------------------------------------------------------------------ |
1000 |
\par D: 65,536 ( 5 digits) |
1001 |
\par ------------------------------------------------------------------------------ |
1002 |
\par RAP execution ends. |
1003 |
\par ------------------------------------------------------------------------------ |
1004 |
\par } |
1005 |
\par \page |
1006 |
\par {\*\bkmkstart _Toc498721675}{\pntext\pard\plain\b\i\f5 4.9\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number Sum [+]{\*\bkmkend _Toc498721675} |
1007 |
\par \pard\plain \widctlpar \f4\fs20 |
1008 |
\par {\*\bkmkstart _Toc498721676}{\pntext\pard\plain\f5 4.9.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721676} |
1009 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap + R1 R2 |
1010 |
\par }\pard \li720\widctlpar Forms the sum of R1 and R2, presenting the sum in lowest terms. |
1011 |
\par \pard \widctlpar |
1012 |
\par {\*\bkmkstart _Toc498721677}{\pntext\pard\plain\f5 4.9.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721677} |
1013 |
\par \pard\plain \widctlpar \f4\fs20 Forms the sum of two arbitrary rational numbers using standard algebraic techniques. The sum is presented as a rational number in lowest terms. |
1014 |
\par |
1015 |
\par {\*\bkmkstart _Toc498721678}{\pntext\pard\plain\f5 4.9.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721678} |
1016 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to form the sum of 7/91 and 3.14 is reproduced below. Note that the inputs and outputs are presented in reduced form. |
1017 |
\par |
1018 |
\par {\f11\fs16 C:\\ >rap + 7/91 3.14 |
1019 |
\par ------------------------------------------------------------------------------ |
1020 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1021 |
\par ------------------------------------------------------------------------------ |
1022 |
\par arg1_h: 1 ( 1 digit) |
1023 |
\par ------------------------------------------------------------------------------ |
1024 |
\par arg1_k: 13 ( 2 digits) |
1025 |
\par ------------------------------------------------------------------------------ |
1026 |
\par arg2_h: 157 ( 3 digits) |
1027 |
\par ------------------------------------------------------------------------------ |
1028 |
\par arg2_k: 50 ( 2 digits) |
1029 |
\par ------------------------------------------------------------------------------ |
1030 |
\par result_h: 2,091 ( 4 digits) |
1031 |
\par ------------------------------------------------------------------------------ |
1032 |
\par result_k: 650 ( 3 digits) |
1033 |
\par ------------------------------------------------------------------------------ |
1034 |
\par RAP execution ends. |
1035 |
\par ------------------------------------------------------------------------------ |
1036 |
\par } |
1037 |
\par \page |
1038 |
\par {\*\bkmkstart _Toc498721679}{\pntext\pard\plain\b\i\f5 4.10\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number Difference [-]{\*\bkmkend _Toc498721679} |
1039 |
\par \pard\plain \widctlpar \f4\fs20 |
1040 |
\par {\*\bkmkstart _Toc498721680}{\pntext\pard\plain\f5 4.10.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721680} |
1041 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap - R1 R2 |
1042 |
\par }\pard \li720\widctlpar Subtracts R2 from R1, presenting the difference in lowest terms. |
1043 |
\par \pard \widctlpar |
1044 |
\par {\*\bkmkstart _Toc498721681}{\pntext\pard\plain\f5 4.10.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721681} |
1045 |
\par \pard\plain \widctlpar \f4\fs20 Forms the difference of two arbitrary rational numbers, using standard algebraic techniques. The sum is presented as a rational number in lowest terms. |
1046 |
\par |
1047 |
\par {\*\bkmkstart _Toc498721682}{\pntext\pard\plain\f5 4.10.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721682} |
1048 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to subtract two rational numbers is reproduced below. |
1049 |
\par |
1050 |
\par {\f11\fs16 C:\\>rap - 92493234924/233472634 872434/23643 |
1051 |
\par ------------------------------------------------------------------------------ |
1052 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1053 |
\par ------------------------------------------------------------------------------ |
1054 |
\par arg1_h: 46,246,617,462 ( 11 digits) |
1055 |
\par ------------------------------------------------------------------------------ |
1056 |
\par arg1_k: 116,736,317 ( 9 digits) |
1057 |
\par ------------------------------------------------------------------------------ |
1058 |
\par arg2_h: 872,434 ( 6 digits) |
1059 |
\par ------------------------------------------------------------------------------ |
1060 |
\par arg2_k: 23,643 ( 5 digits) |
1061 |
\par ------------------------------------------------------------------------------ |
1062 |
\par result_h: 991,564,044,668,488 ( 15 digits) |
1063 |
\par ------------------------------------------------------------------------------ |
1064 |
\par result_k: 2,759,996,742,831 ( 13 digits) |
1065 |
\par ------------------------------------------------------------------------------ |
1066 |
\par RAP execution ends. |
1067 |
\par ------------------------------------------------------------------------------ |
1068 |
\par } |
1069 |
\par \page |
1070 |
\par {\*\bkmkstart _Toc498721683}{\pntext\pard\plain\b\i\f5 4.11\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number Product [*]{\*\bkmkend _Toc498721683} |
1071 |
\par \pard\plain \widctlpar \f4\fs20 |
1072 |
\par {\*\bkmkstart _Toc498721684}{\pntext\pard\plain\f5 4.11.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721684} |
1073 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap * R1 R2 |
1074 |
\par }\pard \li720\widctlpar Forms the product of R1 and R2, presenting the product in lowest terms. |
1075 |
\par \pard \widctlpar |
1076 |
\par {\*\bkmkstart _Toc498721685}{\pntext\pard\plain\f5 4.11.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721685} |
1077 |
\par \pard\plain \widctlpar \f4\fs20 Forms the product of two arbitrary rational numbers, using standard algebraic techniques. The product is presented as a rational number in lowest terms. |
1078 |
\par |
1079 |
\par {\*\bkmkstart _Toc498721686}{\pntext\pard\plain\f5 4.11.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721686} |
1080 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to multiply two rational numbers is reproduced below. |
1081 |
\par |
1082 |
\par {\f11\fs16 C:\\>rap * 0.14 7/3 |
1083 |
\par ------------------------------------------------------------------------------ |
1084 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1085 |
\par ------------------------------------------------------------------------------ |
1086 |
\par arg1_h: 7 ( 1 digit) |
1087 |
\par ------------------------------------------------------------------------------ |
1088 |
\par arg1_k: 50 ( 2 digits) |
1089 |
\par ------------------------------------------------------------------------------ |
1090 |
\par arg2_h: 7 ( 1 digit) |
1091 |
\par ------------------------------------------------------------------------------ |
1092 |
\par arg2_k: 3 ( 1 digit) |
1093 |
\par ------------------------------------------------------------------------------ |
1094 |
\par result_h: 49 ( 2 digits) |
1095 |
\par ------------------------------------------------------------------------------ |
1096 |
\par result_k: 150 ( 3 digits) |
1097 |
\par ------------------------------------------------------------------------------ |
1098 |
\par RAP execution ends. |
1099 |
\par ------------------------------------------------------------------------------ |
1100 |
\par } |
1101 |
\par \page |
1102 |
\par {\*\bkmkstart _Toc498721687}{\pntext\pard\plain\b\i\f5 4.12\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number Quotient [/]{\*\bkmkend _Toc498721687} |
1103 |
\par \pard\plain \widctlpar \f4\fs20 |
1104 |
\par {\*\bkmkstart _Toc498721688}{\pntext\pard\plain\f5 4.12.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721688} |
1105 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap / R1 R2 |
1106 |
\par }\pard \li720\widctlpar Divides R1 by R2, presenting the quotient in lowest terms. |
1107 |
\par \pard \widctlpar |
1108 |
\par {\*\bkmkstart _Toc498721689}{\pntext\pard\plain\f5 4.12.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721689} |
1109 |
\par \pard\plain \widctlpar \f4\fs20 Forms the quotient of two arbitrary rational numbers, which will also be a rational number. The quotient is presented as a rational number in lowest terms. |
1110 |
\par |
1111 |
\par The quotient is rephrased in integer terms: |
1112 |
\par |
1113 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw859\objh1240{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
1114 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1115 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1116 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1117 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1118 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1119 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1120 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1121 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1122 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c00000000000004600000000000000000000000080cf |
1123 |
2cdf674dc00103000000400400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
1124 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
1125 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
1126 |
000000000000000000000000030000003802000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b000000feffffff0d000000fefffffffeffffff10000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1127 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1128 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1129 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1130 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800ec0500008b0800005b030000d80400000000 |
1131 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800ec058b0800000100090000031701000004001500000000000500 |
1132 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02c00760051200000026060f001a00ffffffff000010000000c0ffffffa6ffffff20050000660700000b00000026060f000c004d617468547970650000c00109000000 |
1133 |
fa02000008000000000000002200040000002d01000005000000140212026f0005000000130212026301050000001402d4056000050000001302d405720109000000fa02000010000000000000002200040000002d010100050000001402e0034000050000001302e0039201050000001402e0034203050000001302e003 |
1134 |
140515000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e000087040000002d01020008000000320a6c05710302000000626308000000320a4e035c0302000000616408000000320a60077a0001000000640008000000320a4205920001000000630008000000320a9e038600 |
1135 |
01000000620008000000320a8001890001000000610010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01030004000000f001020008000000320a40040402010000003d000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc0200000000 |
1136 |
0102022253797374656d0000040000002d01020004000000f0010300030000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f |
1137 |
6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200b2d85400000000000000 |
1138 |
2c6e4900287a49000000000003010103010a01030e000001030e0000011283610000011283620000000001030e000001010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
1139 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000c000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
1140 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000e00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
1141 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
1142 |
ffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000128363000001128364000000000002863d00030e0000011283610012836400000112836200128363000000000000000000000000000000000000000000000000000000000000 |
1143 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
1144 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
1145 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
1146 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn56 {\pict\wmetafile8\picw1516\pich2187\picwgoal859\pichgoal1240 |
1147 |
010009000003170100000400150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02c00760051200000026060f001a00ffffffff000010000000c0ffffffa6ffffff20050000660700000b00000026060f |
1148 |
000c004d617468547970650000c00109000000fa02000008000000000000002200040000002d01000005000000140212026f0005000000130212026301050000001402d4056000050000001302d405720109000000fa02000010000000000000002200040000002d010100050000001402e0034000050000001302e0039201 |
1149 |
050000001402e0034203050000001302e003140515000000fb0280fe0000000000009001010000000402001054696d6573204e657720526f6d616e000087040000002d01020008000000320a6c05710302000000626308000000320a4e035c0302000000616408000000320a60077a0001000000640008000000320a420592 |
1150 |
0001000000630008000000320a9e03860001000000620008000000320a8001890001000000610010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01030004000000f001020008000000320a40040402010000003d000a00000026060f000a00ffffffff01000000000010000000 |
1151 |
fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f0010300030000000000000000ffffff00ffffff0030393700018000003439370036353300000001006f6334003439370001460100ffffff00ffffff00000000000000000000000000d002d000ffffff0000000000ffff |
1152 |
ff000000000000000000ffffff00ffffff}}}}} |
1153 |
\par \pard \widctlpar |
1154 |
\par {\*\bkmkstart _Toc498721690}{\pntext\pard\plain\f5 4.12.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721690} |
1155 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to form the rational quotient of two rational numbers is reproduced below. |
1156 |
\par |
1157 |
\par {\f11\fs16 C:\\>rap / 3.14 -157/2 |
1158 |
\par ------------------------------------------------------------------------------ |
1159 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1160 |
\par ------------------------------------------------------------------------------ |
1161 |
\par arg1_h: 157 ( 3 digits) |
1162 |
\par ------------------------------------------------------------------------------ |
1163 |
\par arg1_k: 50 ( 2 digits) |
1164 |
\par ------------------------------------------------------------------------------ |
1165 |
\par arg2_h: - 157 ( 3 digits) |
1166 |
\par ------------------------------------------------------------------------------ |
1167 |
\par arg2_k: 2 ( 1 digit) |
1168 |
\par ------------------------------------------------------------------------------ |
1169 |
\par result_h: - 1 ( 1 digit) |
1170 |
\par ------------------------------------------------------------------------------ |
1171 |
\par result_k: 25 ( 2 digits) |
1172 |
\par ------------------------------------------------------------------------------ |
1173 |
\par RAP execution ends. |
1174 |
\par ------------------------------------------------------------------------------ |
1175 |
\par } |
1176 |
\par \page |
1177 |
\par {\*\bkmkstart _Toc498721691}{\pntext\pard\plain\b\i\f5 4.13\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number Raised To An Integer Power [**]{\*\bkmkend _Toc498721691} |
1178 |
\par \pard\plain \widctlpar \f4\fs20 |
1179 |
\par {\*\bkmkstart _Toc498721692}{\pntext\pard\plain\f5 4.13.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721692} |
1180 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap ** R1 I1 |
1181 |
\par }\pard \li720\widctlpar Raises R1 to the positive power of I1. The result is presented in lowest terms. |
1182 |
\par \pard \widctlpar |
1183 |
\par {\*\bkmkstart _Toc498721693}{\pntext\pard\plain\f5 4.13.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Algorithm Description{\*\bkmkend _Toc498721693} |
1184 |
\par \pard\plain \widctlpar \f4\fs20 Raises a non-negative rational number to a positive integral power. The result is presented in lowest terms. First, the rational number is reduced so that the numerator and denominator are coprime. Then, the nu |
1185 |
merator and denominator (each integers) are each raised to an integer power using the algorithm described in section {\field{\*\fldinst REF _Ref497419035 \\n }{\fldrslt 4.6}}. |
1186 |
\par |
1187 |
\par {\*\bkmkstart _Toc498721694}{\pntext\pard\plain\f5 4.13.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721694} |
1188 |
\par \pard\plain \widctlpar \f4\fs20 Output from the invocation of RAP to raise a rational number to an integer power is reproduced below. |
1189 |
\par |
1190 |
\par {\f11\fs16 C:\\>rap ** 3.14 21 |
1191 |
\par ------------------------------------------------------------------------------ |
1192 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1193 |
\par ------------------------------------------------------------------------------ |
1194 |
\par arg_h: 157 ( 3 digits) |
1195 |
\par ------------------------------------------------------------------------------ |
1196 |
\par arg_k: 50 ( 2 digits) |
1197 |
\par ------------------------------------------------------------------------------ |
1198 |
\par exponent: 21 ( 2 digits) |
1199 |
\par ------------------------------------------------------------------------------ |
1200 |
\par arg_h ** exponent: 12,998,483,899,984,396,303, ( 47 digits) |
1201 |
\par 172,397,297,010,470,279,141,762,157 |
1202 |
\par ------------------------------------------------------------------------------ |
1203 |
\par arg_k ** exponent: 476,837,158, ( 36 digits) |
1204 |
\par 203,125,000,000,000,000,000,000,000 |
1205 |
\par ------------------------------------------------------------------------------ |
1206 |
\par RAP execution ends. |
1207 |
\par ------------------------------------------------------------------------------ |
1208 |
\par } |
1209 |
\par \page |
1210 |
\par {\*\bkmkstart _Toc498721695}{\pntext\pard\plain\b\i\f5 4.14\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Continued Fraction Partial Quotients And Convergents Of A Rational Number [CF] |
1211 |
{\*\bkmkend _Toc498721695} |
1212 |
\par \pard\plain \widctlpar \f4\fs20 |
1213 |
\par {\*\bkmkstart _Toc498721696}{\pntext\pard\plain\f5 4.14.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721696} |
1214 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap cf R1 |
1215 |
\par }\pard \li720\widctlpar Forms the partial quotients and convergents of non-negative rational number R1. |
1216 |
\par \pard \widctlpar |
1217 |
\par {\*\bkmkstart _Toc498721697}{\pntext\pard\plain\f5 4.14.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721697} |
1218 |
\par \pard\plain \widctlpar \f4\fs20 Forms the continued fraction partial quotients of an arbitrary non-negative rational number. The partial quotients are then used to calculate the convergents. |
1219 |
\par |
1220 |
\par {\*\bkmkstart _Toc498721698}{\pntext\pard\plain\f5 4.14.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721698} |
1221 |
\par \pard\plain \widctlpar \f4\fs20 The output below shows the invocation of RAP to form the partial quotients and convergents of a 12-digit rational approximation to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} (obtained using the |
1222 |
\ldblquote {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}\rdblquote -key on a pocket calculator).{\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 {\cs19\super \chftn } |
1223 |
The approximation used in this example is relatively crude (12 digits). Many web sites list the value of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} |
1224 |
to thousands of decimal places, and when using RAP with Farey series of large order it is recommended to use a much more precise value of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} |
1225 |
. RAP has been tested to accommodate about 460 digits of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}, resulting in about 900 partial quotients. This precision should be adequate for practical rational approximations.}} |
1226 |
\par |
1227 |
\par {\f11\fs16 C:\\>rap cf 3.14159265359 |
1228 |
\par ------------------------------------------------------------------------------ |
1229 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1230 |
\par ------------------------------------------------------------------------------ |
1231 |
\par ************************ Inputs To CF Calculation ************************ |
1232 |
\par ------------------------------------------------------------------------------ |
1233 |
\par h_in: 314,159,265,359 ( 12 digits) |
1234 |
\par ------------------------------------------------------------------------------ |
1235 |
\par k_in: 100,000,000,000 ( 12 digits) |
1236 |
\par ------------------------------------------------------------------------------ |
1237 |
\par ************************** CF Partial Quotients ************************** |
1238 |
\par ------------------------------------------------------------------------------ |
1239 |
\par a(0): 3 ( 1 digit) |
1240 |
\par ------------------------------------------------------------------------------ |
1241 |
\par a(1): 7 ( 1 digit) |
1242 |
\par ------------------------------------------------------------------------------ |
1243 |
\par a(2): 15 ( 2 digits) |
1244 |
\par ------------------------------------------------------------------------------ |
1245 |
\par a(3): 1 ( 1 digit) |
1246 |
\par ------------------------------------------------------------------------------ |
1247 |
\par a(4): 292 ( 3 digits) |
1248 |
\par ------------------------------------------------------------------------------ |
1249 |
\par a(5): 1 ( 1 digit) |
1250 |
\par ------------------------------------------------------------------------------ |
1251 |
\par a(6): 1 ( 1 digit) |
1252 |
\par ------------------------------------------------------------------------------ |
1253 |
\par a(7): 1 ( 1 digit) |
1254 |
\par ------------------------------------------------------------------------------ |
1255 |
\par a(8): 2 ( 1 digit) |
1256 |
\par ------------------------------------------------------------------------------ |
1257 |
\par a(9): 1 ( 1 digit) |
1258 |
\par ------------------------------------------------------------------------------ |
1259 |
\par a(10): 4 ( 1 digit) |
1260 |
\par ------------------------------------------------------------------------------ |
1261 |
\par a(11): 1 ( 1 digit) |
1262 |
\par ------------------------------------------------------------------------------ |
1263 |
\par a(12): 1 ( 1 digit) |
1264 |
\par ------------------------------------------------------------------------------ |
1265 |
\par a(13): 1 ( 1 digit) |
1266 |
\par ------------------------------------------------------------------------------ |
1267 |
\par a(14): 1 ( 1 digit) |
1268 |
\par ------------------------------------------------------------------------------ |
1269 |
\par a(15): 1 ( 1 digit) |
1270 |
\par ------------------------------------------------------------------------------ |
1271 |
\par a(16): 3 ( 1 digit) |
1272 |
\par ------------------------------------------------------------------------------ |
1273 |
\par a(17): 1 ( 1 digit) |
1274 |
\par ------------------------------------------------------------------------------ |
1275 |
\par a(18): 68 ( 2 digits) |
1276 |
\par ------------------------------------------------------------------------------ |
1277 |
\par a(19): 2 ( 1 digit) |
1278 |
\par ------------------------------------------------------------------------------ |
1279 |
\par a(20): 4 ( 1 digit) |
1280 |
\par ------------------------------------------------------------------------------ |
1281 |
\par a(21): 2 ( 1 digit) |
1282 |
\par ------------------------------------------------------------------------------ |
1283 |
\par ***************************** CF Convergents ***************************** |
1284 |
\par ------------------------------------------------------------------------------ |
1285 |
\par p(0): 3 ( 1 digit) |
1286 |
\par q(0): 1 ( 1 digit) |
1287 |
\par ------------------------------------------------------------------------------ |
1288 |
\par p(1): 22 ( 2 digits) |
1289 |
\par q(1): 7 ( 1 digit) |
1290 |
\par ------------------------------------------------------------------------------ |
1291 |
\par p(2): 333 ( 3 digits) |
1292 |
\par q(2): 106 ( 3 digits) |
1293 |
\par ------------------------------------------------------------------------------ |
1294 |
\par p(3): 355 ( 3 digits) |
1295 |
\par q(3): 113 ( 3 digits) |
1296 |
\par ------------------------------------------------------------------------------ |
1297 |
\par p(4): 103,993 ( 6 digits) |
1298 |
\par q(4): 33,102 ( 5 digits) |
1299 |
\par ------------------------------------------------------------------------------ |
1300 |
\par p(5): 104,348 ( 6 digits) |
1301 |
\par q(5): 33,215 ( 5 digits) |
1302 |
\par ------------------------------------------------------------------------------ |
1303 |
\par p(6): 208,341 ( 6 digits) |
1304 |
\par q(6): 66,317 ( 5 digits) |
1305 |
\par ------------------------------------------------------------------------------ |
1306 |
\par p(7): 312,689 ( 6 digits) |
1307 |
\par q(7): 99,532 ( 5 digits) |
1308 |
\par ------------------------------------------------------------------------------ |
1309 |
\par p(8): 833,719 ( 6 digits) |
1310 |
\par q(8): 265,381 ( 6 digits) |
1311 |
\par ------------------------------------------------------------------------------ |
1312 |
\par p(9): 1,146,408 ( 7 digits) |
1313 |
\par q(9): 364,913 ( 6 digits) |
1314 |
\par ------------------------------------------------------------------------------ |
1315 |
\par p(10): 5,419,351 ( 7 digits) |
1316 |
\par q(10): 1,725,033 ( 7 digits) |
1317 |
\par ------------------------------------------------------------------------------ |
1318 |
\par p(11): 6,565,759 ( 7 digits) |
1319 |
\par q(11): 2,089,946 ( 7 digits) |
1320 |
\par ------------------------------------------------------------------------------ |
1321 |
\par p(12): 11,985,110 ( 8 digits) |
1322 |
\par q(12): 3,814,979 ( 7 digits) |
1323 |
\par ------------------------------------------------------------------------------ |
1324 |
\par p(13): 18,550,869 ( 8 digits) |
1325 |
\par q(13): 5,904,925 ( 7 digits) |
1326 |
\par ------------------------------------------------------------------------------ |
1327 |
\par p(14): 30,535,979 ( 8 digits) |
1328 |
\par q(14): 9,719,904 ( 7 digits) |
1329 |
\par ------------------------------------------------------------------------------ |
1330 |
\par p(15): 49,086,848 ( 8 digits) |
1331 |
\par q(15): 15,624,829 ( 8 digits) |
1332 |
\par ------------------------------------------------------------------------------ |
1333 |
\par p(16): 177,796,523 ( 9 digits) |
1334 |
\par q(16): 56,594,391 ( 8 digits) |
1335 |
\par ------------------------------------------------------------------------------ |
1336 |
\par p(17): 226,883,371 ( 9 digits) |
1337 |
\par q(17): 72,219,220 ( 8 digits) |
1338 |
\par ------------------------------------------------------------------------------ |
1339 |
\par p(18): 15,605,865,751 ( 11 digits) |
1340 |
\par q(18): 4,967,501,351 ( 10 digits) |
1341 |
\par ------------------------------------------------------------------------------ |
1342 |
\par p(19): 31,438,614,873 ( 11 digits) |
1343 |
\par q(19): 10,007,221,922 ( 11 digits) |
1344 |
\par ------------------------------------------------------------------------------ |
1345 |
\par p(20): 141,360,325,243 ( 12 digits) |
1346 |
\par q(20): 44,996,389,039 ( 11 digits) |
1347 |
\par ------------------------------------------------------------------------------ |
1348 |
\par p(21): 314,159,265,359 ( 12 digits) |
1349 |
\par q(21): 100,000,000,000 ( 12 digits) |
1350 |
\par ------------------------------------------------------------------------------ |
1351 |
\par RAP execution ends. |
1352 |
\par ------------------------------------------------------------------------------ |
1353 |
\par } |
1354 |
\par \page |
1355 |
\par {\*\bkmkstart _Toc498721699}{\pntext\pard\plain\b\i\f5 4.15\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Rational Number With Smallest Denominator In An Interval [MIND]{\*\bkmkend _Toc498721699} |
1356 |
|
1357 |
\par \pard\plain \widctlpar \f4\fs20 |
1358 |
\par {\*\bkmkstart _Toc498721700}{\pntext\pard\plain\f5 4.15.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721700} |
1359 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap mind R1 R2 |
1360 |
\par }\pard \li720\widctlpar Locates the rational number in the interval [R1, R2] with the smallest denominator. |
1361 |
\par \pard \widctlpar |
1362 |
\par {\*\bkmkstart _Toc498721701}{\pntext\pard\plain\f5 4.15.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721701} |
1363 |
\par \pard\plain \widctlpar \f4\fs20 |
1364 |
Locates the rational number with the smallest denominator in an interval of the Farey series. This information is useful to provide an upper bound on the distance between Farey terms in the interval. The algorithm used is to find the best approximation |
1365 |
with the smallest denominator in the interval to the midpoint of the interval, (R1+R2)/2. This algorithm is described fully in the paper. |
1366 |
\par |
1367 |
\par {\*\bkmkstart _Toc498721702}{\pntext\pard\plain\f5 4.15.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721702} |
1368 |
\par \pard\plain \widctlpar \f4\fs20 The invocation below shows RAP used to find the rational number with the smallest denominator in the interval [0.385, 0.386]. This rational number is 22/57. |
1369 |
\par |
1370 |
\par {\f11\fs16 C:\\>rap mind 0.385 0.386 |
1371 |
\par ------------------------------------------------------------------------------ |
1372 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1373 |
\par ------------------------------------------------------------------------------ |
1374 |
\par l_h: 77 ( 2 digits) |
1375 |
\par ------------------------------------------------------------------------------ |
1376 |
\par l_k: 200 ( 3 digits) |
1377 |
\par ------------------------------------------------------------------------------ |
1378 |
\par r_h: 193 ( 3 digits) |
1379 |
\par ------------------------------------------------------------------------------ |
1380 |
\par r_k: 500 ( 3 digits) |
1381 |
\par ------------------------------------------------------------------------------ |
1382 |
\par midpoint_h: 771 ( 3 digits) |
1383 |
\par ------------------------------------------------------------------------------ |
1384 |
\par midpoint_k: 2,000 ( 4 digits) |
1385 |
\par ------------------------------------------------------------------------------ |
1386 |
\par ***************** CF Representation Of Interval Midpoint ***************** |
1387 |
\par ************************ Inputs To CF Calculation ************************ |
1388 |
\par ------------------------------------------------------------------------------ |
1389 |
\par h_in: 771 ( 3 digits) |
1390 |
\par ------------------------------------------------------------------------------ |
1391 |
\par k_in: 2,000 ( 4 digits) |
1392 |
\par ------------------------------------------------------------------------------ |
1393 |
\par ************************** CF Partial Quotients ************************** |
1394 |
\par ------------------------------------------------------------------------------ |
1395 |
\par a(0): 0 ( 1 digit) |
1396 |
\par ------------------------------------------------------------------------------ |
1397 |
\par a(1): 2 ( 1 digit) |
1398 |
\par ------------------------------------------------------------------------------ |
1399 |
\par a(2): 1 ( 1 digit) |
1400 |
\par ------------------------------------------------------------------------------ |
1401 |
\par a(3): 1 ( 1 digit) |
1402 |
\par ------------------------------------------------------------------------------ |
1403 |
\par a(4): 2 ( 1 digit) |
1404 |
\par ------------------------------------------------------------------------------ |
1405 |
\par a(5): 6 ( 1 digit) |
1406 |
\par ------------------------------------------------------------------------------ |
1407 |
\par a(6): 3 ( 1 digit) |
1408 |
\par ------------------------------------------------------------------------------ |
1409 |
\par a(7): 3 ( 1 digit) |
1410 |
\par ------------------------------------------------------------------------------ |
1411 |
\par a(8): 2 ( 1 digit) |
1412 |
\par ------------------------------------------------------------------------------ |
1413 |
\par ***************************** CF Convergents ***************************** |
1414 |
\par ------------------------------------------------------------------------------ |
1415 |
\par p(0): 0 ( 1 digit) |
1416 |
\par q(0): 1 ( 1 digit) |
1417 |
\par ------------------------------------------------------------------------------ |
1418 |
\par p(1): 1 ( 1 digit) |
1419 |
\par q(1): 2 ( 1 digit) |
1420 |
\par ------------------------------------------------------------------------------ |
1421 |
\par p(2): 1 ( 1 digit) |
1422 |
\par q(2): 3 ( 1 digit) |
1423 |
\par ------------------------------------------------------------------------------ |
1424 |
\par p(3): 2 ( 1 digit) |
1425 |
\par q(3): 5 ( 1 digit) |
1426 |
\par ------------------------------------------------------------------------------ |
1427 |
\par p(4): 5 ( 1 digit) |
1428 |
\par q(4): 13 ( 2 digits) |
1429 |
\par ------------------------------------------------------------------------------ |
1430 |
\par p(5): 32 ( 2 digits) |
1431 |
\par q(5): 83 ( 2 digits) |
1432 |
\par ------------------------------------------------------------------------------ |
1433 |
\par p(6): 101 ( 3 digits) |
1434 |
\par q(6): 262 ( 3 digits) |
1435 |
\par ------------------------------------------------------------------------------ |
1436 |
\par p(7): 335 ( 3 digits) |
1437 |
\par q(7): 869 ( 3 digits) |
1438 |
\par ------------------------------------------------------------------------------ |
1439 |
\par p(8): 771 ( 3 digits) |
1440 |
\par q(8): 2,000 ( 4 digits) |
1441 |
\par ------------------------------------------------------------------------------ |
1442 |
\par ******** A Rational Number With Smallest Denominator In Interval ******** |
1443 |
\par ------------------------------------------------------------------------------ |
1444 |
\par result_h: 22 ( 2 digits) |
1445 |
\par ------------------------------------------------------------------------------ |
1446 |
\par result_k: 57 ( 2 digits) |
1447 |
\par ------------------------------------------------------------------------------ |
1448 |
\par RAP execution ends. |
1449 |
\par ------------------------------------------------------------------------------ |
1450 |
\par } |
1451 |
\par \page |
1452 |
\par {\*\bkmkstart _Toc498721703}{\pntext\pard\plain\b\i\f5 4.16\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Enclosing Rational Numbers In The Farey Series Of Order N [FN]{\*\bkmkend _Toc498721703} |
1453 |
|
1454 |
\par \pard\plain \widctlpar \f4\fs20 |
1455 |
\par {\*\bkmkstart _Toc498721704}{\pntext\pard\plain\f5 4.16.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721704} |
1456 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap fn R1 ORDER |
1457 |
\par }\pard \li720\widctlpar |
1458 |
Locates the immediate left and right Farey neighbors of non-negative rational number R1, in the Farey series of order ORDER. Any decimal approximations are presented with the default denominator (1E108, to give four lines of digits after the decimal poin |
1459 |
t). |
1460 |
\par \pard \widctlpar {\b |
1461 |
\par rap fn R1 ORDER NNEIGHBORS D |
1462 |
\par }\pard \li720\widctlpar Same as form immediately above, except allows specification of the number of Farey neighbors on both the left and right to generate, and the denominator to use in any decimal approximations presented (see the {\i DAP} |
1463 |
command, section {\field{\*\fldinst REF _Ref497594880 \\n }{\fldrslt 4.8}}). A value of NNEIGHBORS greater than 10,000 is treated as 10,000. |
1464 |
\par \pard \widctlpar |
1465 |
\par {\*\bkmkstart _Toc498721705}{\pntext\pard\plain\f5 4.16.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721705} |
1466 |
\par \pard\plain \widctlpar \f4\fs20 Applies the continued fraction algorithms described in the TOMS paper to obtain Farey neighbors to an arbitrary non-negative rational number R1. |
1467 |
There are two cases to consider: either the supplied rational number R1 is in the Farey series of order ORDER, or it is not. The algorithm will announce clearly which case applies. In either case, the algorithm applied is nearly identical. |
1468 |
\par |
1469 |
\par {\b\ul NOTE:} |
1470 |
The implementation of this algorithm in the RAP program is subtly different than specified in the TOMS paper. The TOMS paper outlines an algorithm where the continued fraction decomposition of R1 is carried out only until the necessary partial quotient |
1471 |
s and convergents are obtained. However, the RAP implementation will form {\i all} |
1472 |
partial quotients and convergents regardless of the value of ORDER. This has no effect on the Farey neighbors obtained, but it means that specifying R1 very precisely may noticeably slow the program, regardless of the value of ORDER. The results will a |
1473 |
lways be as expected, but the software may be more sluggish for more precisely specified R1. |
1474 |
\par |
1475 |
\par {\*\bkmkstart _Toc498721706}{\pntext\pard\plain\f5 4.16.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721706} |
1476 |
\par \pard\plain \widctlpar \f4\fs20 The example invocation below is intended to generate the 10 best approximations to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}{\cs19\super \chftn {\footnote \pard\plain \s18\widctlpar \f4\fs20 { |
1477 |
\cs19\super \chftn } {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} to 1,000 decimal places is supplied in section {\field{\*\fldinst REF _Ref497727390 \\n }{\fldrslt 5.1}}.}} in the Farey series of order 65, |
1478 |
535. The output below includes narrative explanations in a different font and with shading. |
1479 |
\par |
1480 |
\par {\f11\fs16 C:\\>rap fn 3.1415926535897932384626433832795028841971693993751058209749445923078 164062862089 65535 5 1e108 |
1481 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 In the command-line invocation above, the \ldblquote 1e108\rdblquote tells RAP to use this large power-of-ten denominator as the denomi |
1482 |
nator when presenting the decimal approximations of numbers. There are 27 digits per line, so 1e108 is a convenient value to position the decimal point between lines and to give 108 decimal places of precision. |
1483 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
1484 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
1485 |
\par ------------------------------------------------------------------------------ |
1486 |
\par **************** Rational Number h_in/k_in To Approximate **************** |
1487 |
\par ------------------------------------------------------------------------------ |
1488 |
\par h_in: 31,415,926,535,897,932,384,626,433, ( 80 digits) |
1489 |
\par 832,795,028,841,971,693,993,751,058, |
1490 |
\par 209,749,445,923,078,164,062,862,089 |
1491 |
\par ------------------------------------------------------------------------------ |
1492 |
\par k_in: 10,000,000,000,000,000,000,000,000, ( 80 digits) |
1493 |
\par 000,000,000,000,000,000,000,000,000, |
1494 |
\par 000,000,000,000,000,000,000,000,000 |
1495 |
\par ------------------------------------------------------------------------------ |
1496 |
\par *********************** Other Solution Parameters *********************** |
1497 |
\par ------------------------------------------------------------------------------ |
1498 |
\par Order: 65,535 ( 5 digits) |
1499 |
\par ------------------------------------------------------------------------------ |
1500 |
\par NNEIGHBORS: 5 ( 1 digit) |
1501 |
\par ------------------------------------------------------------------------------ |
1502 |
\par DAP Denominator: 1, ( 109 digits) |
1503 |
\par 000,000,000,000,000,000,000,000,000, |
1504 |
\par 000,000,000,000,000,000,000,000,000, |
1505 |
\par 000,000,000,000,000,000,000,000,000, |
1506 |
\par 000,000,000,000,000,000,000,000,000 |
1507 |
\par ------------------------------------------------------------------------------ |
1508 |
\par *************** Continued Fraction Expansion Of h_in/k_in *************** |
1509 |
\par ------------------------------------------------------------------------------ |
1510 |
\par ************************ Inputs To CF Calculation ************************ |
1511 |
\par ------------------------------------------------------------------------------ |
1512 |
\par h_in: 31,415,926,535,897,932,384,626,433, ( 80 digits) |
1513 |
\par 832,795,028,841,971,693,993,751,058, |
1514 |
\par 209,749,445,923,078,164,062,862,089 |
1515 |
\par ------------------------------------------------------------------------------ |
1516 |
\par k_in: 10,000,000,000,000,000,000,000,000, ( 80 digits) |
1517 |
\par 000,000,000,000,000,000,000,000,000, |
1518 |
\par 000,000,000,000,000,000,000,000,000 |
1519 |
\par ------------------------------------------------------------------------------ |
1520 |
\par ************************** CF Partial Quotients ************************** |
1521 |
\par ------------------------------------------------------------------------------ |
1522 |
\par a(0): 3 ( 1 digit) |
1523 |
\par ------------------------------------------------------------------------------ |
1524 |
\par a(1): 7 ( 1 digit) |
1525 |
\par ------------------------------------------------------------------------------ |
1526 |
\par a(2): 15 ( 2 digits) |
1527 |
\par ------------------------------------------------------------------------------ |
1528 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 RAP has generated 148 partial quotients. Most of them are deleted for space. They can be easily reproduced by running RAP with the command-line reproduced above. |
1529 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
1530 |
\par a(145): 1 ( 1 digit) |
1531 |
\par ------------------------------------------------------------------------------ |
1532 |
\par a(146): 2 ( 1 digit) |
1533 |
\par ------------------------------------------------------------------------------ |
1534 |
\par a(147): 16 ( 2 digits) |
1535 |
\par ------------------------------------------------------------------------------ |
1536 |
\par ***************************** CF Convergents ***************************** |
1537 |
\par ------------------------------------------------------------------------------ |
1538 |
\par p(0): 3 ( 1 digit) |
1539 |
\par q(0): 1 ( 1 digit) |
1540 |
\par ------------------------------------------------------------------------------ |
1541 |
\par p(1): 22 ( 2 digits) |
1542 |
\par q(1): 7 ( 1 digit) |
1543 |
\par ------------------------------------------------------------------------------ |
1544 |
\par p(2): 333 ( 3 digits) |
1545 |
\par q(2): 106 ( 3 digits) |
1546 |
\par ------------------------------------------------------------------------------ |
1547 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 RAP has generated 148 convergents. Most of them are deleted for space. They can be easily reproduced by running RAP with the command-line reproduced above. |
1548 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
1549 |
\par p(145): 725,955,471,712,149,333,468,082, ( 78 digits) |
1550 |
\par 037,080,816,297,117,171,943,844,090, |
1551 |
\par 600,740,370,938,512,424,999,369,433 |
1552 |
\par q(145): 231,078,803,575,194,322,803,693, ( 78 digits) |
1553 |
\par 901,261,807,173,022,671,765,576,571, |
1554 |
\par 012,554,067,457,355,871,085,907,056 |
1555 |
\par ------------------------------------------------------------------------------ |
1556 |
\par p(146): 1,918,123,191,511,611,440,697,396, ( 79 digits) |
1557 |
\par 987,232,138,284,053,407,628,119,185, |
1558 |
\par 475,563,067,186,535,358,691,468,291 |
1559 |
\par q(146): 610,557,574,776,550,354,824,769, ( 78 digits) |
1560 |
\par 131,171,137,051,686,083,014,651,464, |
1561 |
\par 311,715,370,783,915,258,057,130,809 |
1562 |
\par ------------------------------------------------------------------------------ |
1563 |
\par p(147): 31,415,926,535,897,932,384,626,433, ( 80 digits) |
1564 |
\par 832,795,028,841,971,693,993,751,058, |
1565 |
\par 209,749,445,923,078,164,062,862,089 |
1566 |
\par q(147): 10,000,000,000,000,000,000,000,000, ( 80 digits) |
1567 |
\par 000,000,000,000,000,000,000,000,000, |
1568 |
\par 000,000,000,000,000,000,000,000,000 |
1569 |
\par ------------------------------------------------------------------------------ |
1570 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 |
1571 |
The first rational number below is the highest-order convergent with a denominator which is not larger than 65,535. The second rational number is an intermediate fraction chosen according to a formula in the TOMS paper. It is proved in the paper that th |
1572 |
ese two numbers are the two Farey neighbors to the rational number of interest (if the rational number of interest is not in the Fa |
1573 |
rey series). The two numbers are not necessarily in ascending order (it depends on whether the convergent is even or odd). If the rational number of interest is already in the Farey series of interest, the convergent will be this rational number, and th |
1574 |
e intermediate fraction will be its left or right Farey neighbor. |
1575 |
\par \pard \widctlpar {\f11\fs16 ***************** Highest-Order Convergent With q(i)<=N ***************** |
1576 |
\par ------------------------------------------------------------------------------ |
1577 |
\par p(5): 104,348 ( 6 digits) |
1578 |
\par q(5): 33,215 ( 5 digits) |
1579 |
\par ------------------------------------------------------------------------------ |
1580 |
\par ******************* Accompanying Intermediate Fraction ******************* |
1581 |
\par ------------------------------------------------------------------------------ |
1582 |
\par intermediate_h: 103,993 ( 6 digits) |
1583 |
\par intermediate_k: 33,102 ( 5 digits) |
1584 |
\par ------------------------------------------------------------------------------ |
1585 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The line below indicates that the rational number of interest (3.14\'85) is not in the Farey series of interest (F{\sub 65,535} |
1586 |
).. In the neighbors presented just after this in the output, the neighbors are subscripted so that any number with a negative subscript is less than the rational number of interest, any number with a positive subscript is larger than the rational number |
1587 |
of interest, and the subscript \ldblquote 0\rdblquote is reserved for the ratio |
1588 |
nal number of interest if it appears in the Farey series of interest. In this case, the rational number of interest is not in the Farey series of interest, so there will not be a number presented with subscript \ldblquote 0\rdblquote . |
1589 |
\par \pard \widctlpar {\f11\fs16 ****************************************************************************** |
1590 |
\par ************** h_in/k_in IS NOT In Farey Series Of Interest ************** |
1591 |
\par ****************************************************************************** |
1592 |
\par ------------------------------------------------------------------------------ |
1593 |
\par ************************ Farey Neighbor Index -5 ************************ |
1594 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The subscript (or index) of \ldblquote -5\rdblquote here indicates that this is the fifth Farey neighbor to the left of the rational number of interest. |
1595 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
1596 |
\par h(-5): 205,501 ( 6 digits) |
1597 |
\par ------------------------------------------------------------------------------ |
1598 |
\par k(-5): 65,413 ( 5 digits) |
1599 |
\par ------------------------------------------------------------------------------ |
1600 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The rational number below is the rational number 205,501/65,413 expressed as a decimal approximation. From the output below, one knows that 205,501/65,413 is 3.141592649\'85. |
1601 |
\par \pard \widctlpar {\f11\fs16 DAP_N(-5): 3, ( 109 digits) |
1602 |
\par 141,592,649,779,095,898,368,825,768, |
1603 |
\par 578,111,384,587,161,573,387,552,932, |
1604 |
\par 903,245,532,233,653,860,853,347,193, |
1605 |
\par 982,847,446,226,285,294,971,947,472 |
1606 |
\par ------------------------------------------------------------------------------ |
1607 |
\par DAP_D(-5): 1, ( 109 digits) |
1608 |
\par 000,000,000,000,000,000,000,000,000, |
1609 |
\par 000,000,000,000,000,000,000,000,000, |
1610 |
\par 000,000,000,000,000,000,000,000,000, |
1611 |
\par 000,000,000,000,000,000,000,000,000 |
1612 |
\par ------------------------------------------------------------------------------ |
1613 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 |
1614 |
The rational number below is the error (approximation minus actual) of the approximation, expressed as a lowest-terms rational number. This rational number might not be useful or intuitive for Farey series of large orders. |
1615 |
\par \pard \widctlpar {\f11\fs16 error_h(-5): - 2,492,691,451,075,568,916,304, ( 76 digits) |
1616 |
\par 621,221,639,894,419,213,237,970,674, |
1617 |
\par 340,506,166,311,945,843,997,827,757 |
1618 |
\par ------------------------------------------------------------------------------ |
1619 |
\par error_k(-5): 654, ( 84 digits) |
1620 |
\par 130,000,000,000,000,000,000,000,000, |
1621 |
\par 000,000,000,000,000,000,000,000,000, |
1622 |
\par 000,000,000,000,000,000,000,000,000 |
1623 |
\par ------------------------------------------------------------------------------ |
1624 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The rational number below is the error (approximation minus actual) of the approxi |
1625 |
mation, expressed as a decimal approximation. Because the imaginary decimal point is positioned to the left of the fourth line up, it is easy to see that the approximation error is about 3.81 {{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt |
1626 |
\f1\fs20}}} 10{\super -9}. |
1627 |
\par \pard \widctlpar {\f11\fs16 ERROR_DAP_N(-5): - 3,810,697,340,093,817,614, ( 100 digits) |
1628 |
\par 701,391,499,610,007,825,987,552,888, |
1629 |
\par 071,699,060,074,162,545,432,861,706, |
1630 |
\par 017,152,553,773,714,705,028,052,527 |
1631 |
\par ------------------------------------------------------------------------------ |
1632 |
\par ERROR_DAP_D(-5): 1, ( 109 digits) |
1633 |
\par 000,000,000,000,000,000,000,000,000, |
1634 |
\par 000,000,000,000,000,000,000,000,000, |
1635 |
\par 000,000,000,000,000,000,000,000,000, |
1636 |
\par 000,000,000,000,000,000,000,000,000 |
1637 |
\par ------------------------------------------------------------------------------ |
1638 |
\par ************************ Farey Neighbor Index -4 ************************ |
1639 |
\par ------------------------------------------------------------------------------ |
1640 |
\par h(-4): 102,928 ( 6 digits) |
1641 |
\par ------------------------------------------------------------------------------ |
1642 |
\par k(-4): 32,763 ( 5 digits) |
1643 |
\par ------------------------------------------------------------------------------ |
1644 |
\par DAP_N(-4): 3, ( 109 digits) |
1645 |
\par 141,592,650,245,703,995,360,620,211, |
1646 |
\par 824,314,012,758,294,417,483,136,464, |
1647 |
\par 914,690,351,921,374,721,484,601,532, |
1648 |
\par 216,219,515,917,345,786,405,396,331 |
1649 |
\par ------------------------------------------------------------------------------ |
1650 |
\par DAP_D(-4): 1, ( 109 digits) |
1651 |
\par 000,000,000,000,000,000,000,000,000, |
1652 |
\par 000,000,000,000,000,000,000,000,000, |
1653 |
\par 000,000,000,000,000,000,000,000,000, |
1654 |
\par 000,000,000,000,000,000,000,000,000 |
1655 |
\par ------------------------------------------------------------------------------ |
1656 |
\par error_h(-4): - 1,095,623,958,717,515,851,663, ( 76 digits) |
1657 |
\par 863,529,949,518,610,317,265,920,126, |
1658 |
\par 021,096,777,809,889,191,550,621,907 |
1659 |
\par ------------------------------------------------------------------------------ |
1660 |
\par error_k(-4): 327, ( 84 digits) |
1661 |
\par 630,000,000,000,000,000,000,000,000, |
1662 |
\par 000,000,000,000,000,000,000,000,000, |
1663 |
\par 000,000,000,000,000,000,000,000,000 |
1664 |
\par ------------------------------------------------------------------------------ |
1665 |
\par ERROR_DAP_N(-4): - 3,344,089,243,102,023,171, ( 100 digits) |
1666 |
\par 455,188,871,438,874,981,891,969,356, |
1667 |
\par 060,254,240,386,441,684,801,607,367, |
1668 |
\par 783,780,484,082,654,213,594,603,668 |
1669 |
\par ------------------------------------------------------------------------------ |
1670 |
\par ERROR_DAP_D(-4): 1, ( 109 digits) |
1671 |
\par 000,000,000,000,000,000,000,000,000, |
1672 |
\par 000,000,000,000,000,000,000,000,000, |
1673 |
\par 000,000,000,000,000,000,000,000,000, |
1674 |
\par 000,000,000,000,000,000,000,000,000 |
1675 |
\par ------------------------------------------------------------------------------ |
1676 |
\par ************************ Farey Neighbor Index -3 ************************ |
1677 |
\par ------------------------------------------------------------------------------ |
1678 |
\par h(-3): 103,283 ( 6 digits) |
1679 |
\par ------------------------------------------------------------------------------ |
1680 |
\par k(-3): 32,876 ( 5 digits) |
1681 |
\par ------------------------------------------------------------------------------ |
1682 |
\par DAP_N(-3): 3, ( 109 digits) |
1683 |
\par 141,592,651,174,108,772,356,734,395, |
1684 |
\par 911,911,424,747,536,196,617,593,381, |
1685 |
\par 189,925,781,725,270,714,198,807,640, |
1686 |
\par 832,218,031,390,680,131,402,847,061 |
1687 |
\par ------------------------------------------------------------------------------ |
1688 |
\par DAP_D(-3): 1, ( 109 digits) |
1689 |
\par 000,000,000,000,000,000,000,000,000, |
1690 |
\par 000,000,000,000,000,000,000,000,000, |
1691 |
\par 000,000,000,000,000,000,000,000,000, |
1692 |
\par 000,000,000,000,000,000,000,000,000 |
1693 |
\par ------------------------------------------------------------------------------ |
1694 |
\par error_h(-3): - 198,545,106,269,244,659,671, ( 75 digits) |
1695 |
\par 742,342,052,165,352,934,639,947,425, |
1696 |
\par 930,696,041,779,430,432,663,509,491 |
1697 |
\par ------------------------------------------------------------------------------ |
1698 |
\par error_k(-3): 82, ( 83 digits) |
1699 |
\par 190,000,000,000,000,000,000,000,000, |
1700 |
\par 000,000,000,000,000,000,000,000,000, |
1701 |
\par 000,000,000,000,000,000,000,000,000 |
1702 |
\par ------------------------------------------------------------------------------ |
1703 |
\par ERROR_DAP_N(-3): - 2,415,684,466,105,908,987, ( 100 digits) |
1704 |
\par 367,591,459,449,633,202,757,512,439, |
1705 |
\par 785,018,810,582,545,692,087,401,259, |
1706 |
\par 167,781,968,609,319,868,597,152,938 |
1707 |
\par ------------------------------------------------------------------------------ |
1708 |
\par ERROR_DAP_D(-3): 1, ( 109 digits) |
1709 |
\par 000,000,000,000,000,000,000,000,000, |
1710 |
\par 000,000,000,000,000,000,000,000,000, |
1711 |
\par 000,000,000,000,000,000,000,000,000, |
1712 |
\par 000,000,000,000,000,000,000,000,000 |
1713 |
\par ------------------------------------------------------------------------------ |
1714 |
\par ************************ Farey Neighbor Index -2 ************************ |
1715 |
\par ------------------------------------------------------------------------------ |
1716 |
\par h(-2): 103,638 ( 6 digits) |
1717 |
\par ------------------------------------------------------------------------------ |
1718 |
\par k(-2): 32,989 ( 5 digits) |
1719 |
\par ------------------------------------------------------------------------------ |
1720 |
\par DAP_N(-2): 3, ( 109 digits) |
1721 |
\par 141,592,652,096,153,263,208,948,437, |
1722 |
\par 357,907,181,181,605,989,875,413,016, |
1723 |
\par 460,032,131,922,762,132,832,156,173, |
1724 |
\par 269,877,838,067,234,532,723,028,888 |
1725 |
\par ------------------------------------------------------------------------------ |
1726 |
\par DAP_D(-2): 1, ( 109 digits) |
1727 |
\par 000,000,000,000,000,000,000,000,000, |
1728 |
\par 000,000,000,000,000,000,000,000,000, |
1729 |
\par 000,000,000,000,000,000,000,000,000, |
1730 |
\par 000,000,000,000,000,000,000,000,000 |
1731 |
\par ------------------------------------------------------------------------------ |
1732 |
\par error_h(-2): - 492,736,891,436,441,425,710, ( 75 digits) |
1733 |
\par 075,206,467,804,213,159,853,659,281, |
1734 |
\par 424,471,556,425,554,269,757,454,021 |
1735 |
\par ------------------------------------------------------------------------------ |
1736 |
\par error_k(-2): 329, ( 84 digits) |
1737 |
\par 890,000,000,000,000,000,000,000,000, |
1738 |
\par 000,000,000,000,000,000,000,000,000, |
1739 |
\par 000,000,000,000,000,000,000,000,000 |
1740 |
\par ------------------------------------------------------------------------------ |
1741 |
\par ERROR_DAP_N(-2): - 1,493,639,975,253,694,945, ( 100 digits) |
1742 |
\par 921,595,703,015,563,409,499,692,804, |
1743 |
\par 514,912,460,385,054,273,454,052,726, |
1744 |
\par 730,122,161,932,765,467,276,971,111 |
1745 |
\par ------------------------------------------------------------------------------ |
1746 |
\par ERROR_DAP_D(-2): 1, ( 109 digits) |
1747 |
\par 000,000,000,000,000,000,000,000,000, |
1748 |
\par 000,000,000,000,000,000,000,000,000, |
1749 |
\par 000,000,000,000,000,000,000,000,000, |
1750 |
\par 000,000,000,000,000,000,000,000,000 |
1751 |
\par ------------------------------------------------------------------------------ |
1752 |
\par ************************ Farey Neighbor Index -1 ************************ |
1753 |
\par ------------------------------------------------------------------------------ |
1754 |
\par h(-1): 103,993 ( 6 digits) |
1755 |
\par ------------------------------------------------------------------------------ |
1756 |
\par k(-1): 33,102 ( 5 digits) |
1757 |
\par ------------------------------------------------------------------------------ |
1758 |
\par DAP_N(-1): 3, ( 109 digits) |
1759 |
\par 141,592,653,011,902,604,072,261,494, |
1760 |
\par 773,729,684,007,008,639,961,331,641, |
1761 |
\par 592,653,011,902,604,072,261,494,773, |
1762 |
\par 729,684,007,008,639,961,331,641,592 |
1763 |
\par ------------------------------------------------------------------------------ |
1764 |
\par DAP_D(-1): 1, ( 109 digits) |
1765 |
\par 000,000,000,000,000,000,000,000,000, |
1766 |
\par 000,000,000,000,000,000,000,000,000, |
1767 |
\par 000,000,000,000,000,000,000,000,000, |
1768 |
\par 000,000,000,000,000,000,000,000,000 |
1769 |
\par ------------------------------------------------------------------------------ |
1770 |
\par error_h(-1): - 95,646,678,897,952,106,366, ( 74 digits) |
1771 |
\par 590,522,363,473,507,290,573,764,429, |
1772 |
\par 563,079,472,866,693,404,430,435,039 |
1773 |
\par ------------------------------------------------------------------------------ |
1774 |
\par error_k(-1): 165, ( 84 digits) |
1775 |
\par 510,000,000,000,000,000,000,000,000, |
1776 |
\par 000,000,000,000,000,000,000,000,000, |
1777 |
\par 000,000,000,000,000,000,000,000,000 |
1778 |
\par ------------------------------------------------------------------------------ |
1779 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 This is the last approximation on the left of the number of interest (note the subscript of -1). The error is about 5.78 {{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} 10{ |
1780 |
\super -10}. |
1781 |
\par \pard \widctlpar {\f11\fs16 ERROR_DAP_N(-1): - 577,890,634,390,381,888, ( 99 digits) |
1782 |
\par 505,773,200,190,160,759,413,774,179, |
1783 |
\par 382,291,580,405,212,334,024,714,126, |
1784 |
\par 270,315,992,991,360,038,668,358,407 |
1785 |
\par ------------------------------------------------------------------------------ |
1786 |
\par ERROR_DAP_D(-1): 1, ( 109 digits) |
1787 |
\par 000,000,000,000,000,000,000,000,000, |
1788 |
\par 000,000,000,000,000,000,000,000,000, |
1789 |
\par 000,000,000,000,000,000,000,000,000, |
1790 |
\par 000,000,000,000,000,000,000,000,000 |
1791 |
\par ------------------------------------------------------------------------------ |
1792 |
\par ************************* Farey Neighbor Index 1 ************************* |
1793 |
\par ------------------------------------------------------------------------------ |
1794 |
\par h(1): 104,348 ( 6 digits) |
1795 |
\par ------------------------------------------------------------------------------ |
1796 |
\par k(1): 33,215 ( 5 digits) |
1797 |
\par ------------------------------------------------------------------------------ |
1798 |
\par DAP_N(1): 3, ( 109 digits) |
1799 |
\par 141,592,653,921,421,044,708,715,941, |
1800 |
\par 592,653,921,421,044,708,715,941,592, |
1801 |
\par 653,921,421,044,708,715,941,592,653, |
1802 |
\par 921,421,044,708,715,941,592,653,921 |
1803 |
\par ------------------------------------------------------------------------------ |
1804 |
\par DAP_D(1): 1, ( 109 digits) |
1805 |
\par 000,000,000,000,000,000,000,000,000, |
1806 |
\par 000,000,000,000,000,000,000,000,000, |
1807 |
\par 000,000,000,000,000,000,000,000,000, |
1808 |
\par 000,000,000,000,000,000,000,000,000 |
1809 |
\par ------------------------------------------------------------------------------ |
1810 |
\par error_h(1): 22,030,035,168,926,600,048, ( 74 digits) |
1811 |
\par 742,623,402,782,036,799,511,720,312, |
1812 |
\par 634,430,732,991,756,130,407,142,773 |
1813 |
\par ------------------------------------------------------------------------------ |
1814 |
\par error_k(1): 66, ( 83 digits) |
1815 |
\par 430,000,000,000,000,000,000,000,000, |
1816 |
\par 000,000,000,000,000,000,000,000,000, |
1817 |
\par 000,000,000,000,000,000,000,000,000 |
1818 |
\par ------------------------------------------------------------------------------ |
1819 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 This is the first approximation on the right of the number of interest (note the subscript of 1). The error is about 3.32 {{\field{\*\fldinst SYMBOL 180 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} 10{ |
1820 |
\super -10}. |
1821 |
\par \pard \widctlpar {\f11\fs16 ERROR_DAP_N(1): 331,627,806,246,072,558, ( 99 digits) |
1822 |
\par 313,151,037,223,875,309,340,835,771, |
1823 |
\par 678,976,828,736,892,309,655,383,753, |
1824 |
\par 921,421,044,708,715,941,592,653,921 |
1825 |
\par ------------------------------------------------------------------------------ |
1826 |
\par ERROR_DAP_D(1): 1, ( 109 digits) |
1827 |
\par 000,000,000,000,000,000,000,000,000, |
1828 |
\par 000,000,000,000,000,000,000,000,000, |
1829 |
\par 000,000,000,000,000,000,000,000,000, |
1830 |
\par 000,000,000,000,000,000,000,000,000 |
1831 |
\par ------------------------------------------------------------------------------ |
1832 |
\par ************************* Farey Neighbor Index 2 ************************* |
1833 |
\par ------------------------------------------------------------------------------ |
1834 |
\par h(2): 104,703 ( 6 digits) |
1835 |
\par ------------------------------------------------------------------------------ |
1836 |
\par k(2): 33,328 ( 5 digits) |
1837 |
\par ------------------------------------------------------------------------------ |
1838 |
\par DAP_N(2): 3, ( 109 digits) |
1839 |
\par 141,592,654,824,771,963,514,162,265, |
1840 |
\par 962,554,008,641,382,621,219,395,103, |
1841 |
\par 216,514,642,342,774,843,975,036,005, |
1842 |
\par 760,921,747,479,596,735,477,676,428 |
1843 |
\par ------------------------------------------------------------------------------ |
1844 |
\par DAP_D(2): 1, ( 109 digits) |
1845 |
\par 000,000,000,000,000,000,000,000,000, |
1846 |
\par 000,000,000,000,000,000,000,000,000, |
1847 |
\par 000,000,000,000,000,000,000,000,000, |
1848 |
\par 000,000,000,000,000,000,000,000,000 |
1849 |
\par ------------------------------------------------------------------------------ |
1850 |
\par error_h(2): 25,724,606,842,823,138,326, ( 74 digits) |
1851 |
\par 287,954,922,172,961,411,016,545,749, |
1852 |
\par 091,904,142,228,184,257,058,268,613 |
1853 |
\par ------------------------------------------------------------------------------ |
1854 |
\par error_k(2): 20, ( 83 digits) |
1855 |
\par 830,000,000,000,000,000,000,000,000, |
1856 |
\par 000,000,000,000,000,000,000,000,000, |
1857 |
\par 000,000,000,000,000,000,000,000,000 |
1858 |
\par ------------------------------------------------------------------------------ |
1859 |
\par ERROR_DAP_N(2): 1,234,978,725,051,518,882, ( 100 digits) |
1860 |
\par 683,051,124,444,213,221,844,289,282, |
1861 |
\par 241,570,050,034,958,437,688,827,105, |
1862 |
\par 760,921,747,479,596,735,477,676,428 |
1863 |
\par ------------------------------------------------------------------------------ |
1864 |
\par ERROR_DAP_D(2): 1, ( 109 digits) |
1865 |
\par 000,000,000,000,000,000,000,000,000, |
1866 |
\par 000,000,000,000,000,000,000,000,000, |
1867 |
\par 000,000,000,000,000,000,000,000,000, |
1868 |
\par 000,000,000,000,000,000,000,000,000 |
1869 |
\par ------------------------------------------------------------------------------ |
1870 |
\par ************************* Farey Neighbor Index 3 ************************* |
1871 |
\par ------------------------------------------------------------------------------ |
1872 |
\par h(3): 105,058 ( 6 digits) |
1873 |
\par ------------------------------------------------------------------------------ |
1874 |
\par k(3): 33,441 ( 5 digits) |
1875 |
\par ------------------------------------------------------------------------------ |
1876 |
\par DAP_N(3): 3, ( 109 digits) |
1877 |
\par 141,592,655,722,017,882,240,363,625, |
1878 |
\par 489,668,371,161,149,487,156,484,554, |
1879 |
\par 887,712,688,017,702,819,891,749,648, |
1880 |
\par 634,909,243,144,642,803,743,907,179 |
1881 |
\par ------------------------------------------------------------------------------ |
1882 |
\par DAP_D(3): 1, ( 109 digits) |
1883 |
\par 000,000,000,000,000,000,000,000,000, |
1884 |
\par 000,000,000,000,000,000,000,000,000, |
1885 |
\par 000,000,000,000,000,000,000,000,000, |
1886 |
\par 000,000,000,000,000,000,000,000,000 |
1887 |
\par ------------------------------------------------------------------------------ |
1888 |
\par error_h(3): 713,037,243,125,707,426,197, ( 75 digits) |
1889 |
\par 501,440,495,624,581,154,970,862,407, |
1890 |
\par 768,778,886,343,115,573,828,881,751 |
1891 |
\par ------------------------------------------------------------------------------ |
1892 |
\par error_k(3): 334, ( 84 digits) |
1893 |
\par 410,000,000,000,000,000,000,000,000, |
1894 |
\par 000,000,000,000,000,000,000,000,000, |
1895 |
\par 000,000,000,000,000,000,000,000,000 |
1896 |
\par ------------------------------------------------------------------------------ |
1897 |
\par ERROR_DAP_N(3): 2,132,224,643,777,720,242, ( 100 digits) |
1898 |
\par 210,165,486,963,980,087,781,378,733, |
1899 |
\par 912,768,095,709,886,413,605,540,748, |
1900 |
\par 634,909,243,144,642,803,743,907,179 |
1901 |
\par ------------------------------------------------------------------------------ |
1902 |
\par ERROR_DAP_D(3): 1, ( 109 digits) |
1903 |
\par 000,000,000,000,000,000,000,000,000, |
1904 |
\par 000,000,000,000,000,000,000,000,000, |
1905 |
\par 000,000,000,000,000,000,000,000,000, |
1906 |
\par 000,000,000,000,000,000,000,000,000 |
1907 |
\par ------------------------------------------------------------------------------ |
1908 |
\par ************************* Farey Neighbor Index 4 ************************* |
1909 |
\par ------------------------------------------------------------------------------ |
1910 |
\par h(4): 105,413 ( 6 digits) |
1911 |
\par ------------------------------------------------------------------------------ |
1912 |
\par k(4): 33,554 ( 5 digits) |
1913 |
\par ------------------------------------------------------------------------------ |
1914 |
\par DAP_N(4): 3, ( 109 digits) |
1915 |
\par 141,592,656,613,220,480,419,622,101, |
1916 |
\par 686,833,164,451,332,180,962,031,352, |
1917 |
\par 446,802,169,637,003,039,876,020,742, |
1918 |
\par 683,435,655,957,560,946,533,945,282 |
1919 |
\par ------------------------------------------------------------------------------ |
1920 |
\par DAP_D(4): 1, ( 109 digits) |
1921 |
\par 000,000,000,000,000,000,000,000,000, |
1922 |
\par 000,000,000,000,000,000,000,000,000, |
1923 |
\par 000,000,000,000,000,000,000,000,000, |
1924 |
\par 000,000,000,000,000,000,000,000,000 |
1925 |
\par ------------------------------------------------------------------------------ |
1926 |
\par error_h(4): 507,240,388,383,122,319,587, ( 75 digits) |
1927 |
\par 197,801,118,240,889,866,838,496,415, |
1928 |
\par 033,545,748,517,641,517,362,732,847 |
1929 |
\par ------------------------------------------------------------------------------ |
1930 |
\par error_k(4): 167, ( 84 digits) |
1931 |
\par 770,000,000,000,000,000,000,000,000, |
1932 |
\par 000,000,000,000,000,000,000,000,000, |
1933 |
\par 000,000,000,000,000,000,000,000,000 |
1934 |
\par ------------------------------------------------------------------------------ |
1935 |
\par ERROR_DAP_N(4): 3,023,427,241,956,978,718, ( 100 digits) |
1936 |
\par 407,330,280,254,162,781,586,925,531, |
1937 |
\par 471,857,577,329,186,633,589,811,842, |
1938 |
\par 683,435,655,957,560,946,533,945,282 |
1939 |
\par ------------------------------------------------------------------------------ |
1940 |
\par ERROR_DAP_D(4): 1, ( 109 digits) |
1941 |
\par 000,000,000,000,000,000,000,000,000, |
1942 |
\par 000,000,000,000,000,000,000,000,000, |
1943 |
\par 000,000,000,000,000,000,000,000,000, |
1944 |
\par 000,000,000,000,000,000,000,000,000 |
1945 |
\par ------------------------------------------------------------------------------ |
1946 |
\par ************************* Farey Neighbor Index 5 ************************* |
1947 |
\par ------------------------------------------------------------------------------ |
1948 |
\par h(5): 105,768 ( 6 digits) |
1949 |
\par ------------------------------------------------------------------------------ |
1950 |
\par k(5): 33,667 ( 5 digits) |
1951 |
\par ------------------------------------------------------------------------------ |
1952 |
\par DAP_N(5): 3, ( 109 digits) |
1953 |
\par 141,592,657,498,440,609,498,915,852, |
1954 |
\par 318,293,878,278,432,886,803,100,959, |
1955 |
\par 396,441,619,389,907,030,623,459,173, |
1956 |
\par 671,547,806,457,361,808,298,927,733 |
1957 |
\par ------------------------------------------------------------------------------ |
1958 |
\par DAP_D(5): 1, ( 109 digits) |
1959 |
\par 000,000,000,000,000,000,000,000,000, |
1960 |
\par 000,000,000,000,000,000,000,000,000, |
1961 |
\par 000,000,000,000,000,000,000,000,000, |
1962 |
\par 000,000,000,000,000,000,000,000,000 |
1963 |
\par ------------------------------------------------------------------------------ |
1964 |
\par error_h(5): 1,315,924,310,406,781,852,151, ( 76 digits) |
1965 |
\par 289,763,977,338,978,312,383,123,252, |
1966 |
\par 365,404,107,727,450,495,622,049,637 |
1967 |
\par ------------------------------------------------------------------------------ |
1968 |
\par error_k(5): 336, ( 84 digits) |
1969 |
\par 670,000,000,000,000,000,000,000,000, |
1970 |
\par 000,000,000,000,000,000,000,000,000, |
1971 |
\par 000,000,000,000,000,000,000,000,000 |
1972 |
\par ------------------------------------------------------------------------------ |
1973 |
\par ERROR_DAP_N(5): 3,908,647,371,036,272,469, ( 100 digits) |
1974 |
\par 038,790,994,081,263,487,427,995,138, |
1975 |
\par 421,497,027,082,090,624,337,250,273, |
1976 |
\par 671,547,806,457,361,808,298,927,733 |
1977 |
\par ------------------------------------------------------------------------------ |
1978 |
\par ERROR_DAP_D(5): 1, ( 109 digits) |
1979 |
\par 000,000,000,000,000,000,000,000,000, |
1980 |
\par 000,000,000,000,000,000,000,000,000, |
1981 |
\par 000,000,000,000,000,000,000,000,000, |
1982 |
\par 000,000,000,000,000,000,000,000,000 |
1983 |
\par ------------------------------------------------------------------------------ |
1984 |
\par RAP execution ends. |
1985 |
\par ------------------------------------------------------------------------------ |
1986 |
\par } |
1987 |
\par {\b\i\ul Practical Note:} For Farey series of large order, the terms become quite dense. If an irrational number to be approximated isn\rquote |
1988 |
t specified precisely enough, it is easy to accidentally generate Farey neighbors which enclose the rational approximation specified, but do not enclose the irrational number. |
1989 |
\par |
1990 |
\par For example, using 3.141592654 as a rational approximation to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} to obtain the best approximations to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} in F{\sub |
1991 |
65,535} yields 104,348/33,215 and 104,703/33,328 as the two best approximations to {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}. However, it is easy to show that |
1992 |
\par |
1993 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw3861\objh660{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
1994 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1995 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1996 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1997 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1998 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
1999 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2000 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2001 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2002 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a070 |
2003 |
34df674dc00103000000c00500000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
2004 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
2005 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
2006 |
000000000000000000000000030000000803000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000feffffff11000000fefffffffeffffff140000001500000016000000feffffffffffffffffffffffffff |
2007 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2008 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2009 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2010 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800981a00008c040000140f0000940200000000 |
2011 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800981a8c0400000100090000038001000003001500000000000500 |
2012 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02200420181200000026060f001a00ffffffff000010000000c0ffffffb8ffffffe0170000d80300000b00000026060f000c004d617468547970650000e00009000000 |
2013 |
fa02000010000000000000002200040000002d0100000500000014020002c20205000000130200028e0705000000140200029e1205000000130200026a1715000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e000081040000002d01010008000000320a6002941701000000 |
2014 |
2e0009000000320a8c03cb14030000003332380008000000320a8c037114010000002c0008000000320a8c03031302000000333309000000320a6e012815030000003730330008000000320a6e01c814010000002c0009000000320a6e018e1203000000313034000c000000320a6002460a090000003134313539323635 |
2015 |
340008000000320a6002e609010000002e0008000000320a6002260901000000330009000000320a8c03f504030000003231350008000000320a8c038f04010000002c0008000000320a8c03210302000000333309000000320a6e014605030000003334380008000000320a6e01ec04010000002c0009000000320a6e01 |
2016 |
b202030000003130340010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01020004000000f001010008000000320a60026011010000003c0008000000320a6002fa07010000003c0008000000320a60028401010000003c0010000000fb0280fe000000000000900101000002 |
2017 |
0002001053796d626f6c0002040000002d01010004000000f001020008000000320a60021c000100000070000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f00101000300000000000000000000000000 |
2018 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
2019 |
ffff00000000000000000000000000000000000000000000000000000000000000000000000010000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
2020 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000001200000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
2021 |
ffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000013000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
2022 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e |
2023 |
000b0000004571756174696f6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000 |
2024 |
0200c8dfc400000000000000f48049001c8349000000000003010103010a010284c00302863c00030e00000102883100028830000288340002822c000288330002883400028838000001028833000288330002822c00028832000288310002883500000002863c000288330002822e000288310002883400028831000288 |
2025 |
3500028839000288320002883600028835000288340002863c00030e00000102883100028830000288340002822c000288370002883000028833000001028833000288330002822c00028833000288320002883800000002822e000000000000000000000000000000000000000000000000000000000000000000000000 |
2026 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw6808\pich1164\picwgoal3860\pichgoal660 |
2027 |
010009000003800100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02200420181200000026060f001a00ffffffff000010000000c0ffffffb8ffffffe0170000d80300000b00000026060f |
2028 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d0100000500000014020002c20205000000130200028e0705000000140200029e1205000000130200026a1715000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e00008104000000 |
2029 |
2d01010008000000320a60029417010000002e0009000000320a8c03cb14030000003332380008000000320a8c037114010000002c0008000000320a8c03031302000000333309000000320a6e012815030000003730330008000000320a6e01c814010000002c0009000000320a6e018e1203000000313034000c00000032 |
2030 |
0a6002460a090000003134313539323635340008000000320a6002e609010000002e0008000000320a6002260901000000330009000000320a8c03f504030000003231350008000000320a8c038f04010000002c0008000000320a8c03210302000000333309000000320a6e014605030000003334380008000000320a6e01 |
2031 |
ec04010000002c0009000000320a6e01b202030000003130340010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01020004000000f001010008000000320a60026011010000003c0008000000320a6002fa07010000003c0008000000320a60028401010000003c0010000000fb |
2032 |
0280fe0000000000009001010000020002001053796d626f6c0002040000002d01010004000000f001020008000000320a60021c000100000070000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f0010100 |
2033 |
03000000000000363635003539390038333700373439005f546f006f633400383635005f546f00343938}}}}} |
2034 |
\par \pard \widctlpar |
2035 |
\par In other words, the rational numbers in F{\sub 65,535} generated enclose the rational approximation of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} used, but they do not enclose {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" |
2036 |
\\s 10}{\fldrslt\f1\fs20}}}. |
2037 |
\par |
2038 |
\par There are three approaches to mitigate this type of problem. |
2039 |
\par |
2040 |
\par The first approach is analytic and practical. It can be shown that the distance between two consecutive terms of the Farey series of any order is 1/ab, where a and b are the denominators of the neighboring terms. It follows immediately that in a Farey s |
2041 |
eries of order N, the minimum distance between terms is 1/(N{\super 2}-N). Although it won\rquote t be done here, this informa |
2042 |
tion can be used to derive the required precision of the rational approximation to the irrational number of interest used to apply the CF algorithms to obtain Farey neighbors, so that at most one Farey term appears between the irrational and the rational |
2043 |
approximation used to apply the algorithms. In other words, one could derive a rule of thumb for how many decimal places are appropriate as a function of the order of the Farey series. |
2044 |
\par |
2045 |
\par The second (analytic and usually impractical) approach would be to cal |
2046 |
culate the continued fraction partial quotients required symbolically rather than numerically. Unfortunately, doing this by hand is generally not practical (although it can be done for many algebraic numbers relatively easily). (Commercial software such |
2047 |
as {\i Mathematica} will do this automatically, even for transcendentals, but as of this writing {\i Mathematica} |
2048 |
costs about $1,500.) Every case where the wrong Farey neighbors are located corresponds to an error in the partial quotients and convergents used\emdash or to |
2049 |
put it another way, the continued fraction representation of the rational approximation used differs from the true continued fraction representation of the irrational relatively [too] early in the partial quotients and convergents. (This gets into techn |
2050 |
ical detail and won\rquote t be discussed here.) |
2051 |
\par |
2052 |
\par The third approach i |
2053 |
s practical. If the irrational number can be bounded by rational numbers, and if the CF algorithms give the same result at both of the rational bounds, then the rational approximation of the irrational is specified precisely enough. The case of 3.141592 |
2054 |
654 is atypical because it is rounded rather than truncated (it came from a pocket calculator). The actual inequality at this number of decimal places which confines {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} is: |
2055 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw3221\objh279{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
2056 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2057 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2058 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2059 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2060 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2061 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2062 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2063 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2064 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a070 |
2065 |
34df674dc00103000000800400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
2066 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
2067 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
2068 |
000000000000000000000000030000001402000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b000000feffffff0d000000fefffffffeffffff1000000011000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2069 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2070 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2071 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2072 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c00000000000000000008002f160000ed010000940c0000170100000000 |
2073 |
0000000000000000000000000000e8030000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008002f16ed0100000100090000030501000002001500000000000500 |
2074 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02c00120141200000026060f001a00ffffffff000010000000c0ffffffc6ffffffe0130000860100000b00000026060f000c004d617468547970650000300015000000 |
2075 |
fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000bf040000002d0100000c000000320a60012a0d090000003134313539323635340008000000320a6001ca0c010000002e0008000000320a60010a0c0100000033000c000000320a60014e010900000031343135393236353300 |
2076 |
08000000320a6001ee00010000002e0008000000320a60012e0001000000330010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010004000000f001000008000000320a6001de0a010000003c0008000000320a60015c08010000003c0010000000fb0280fe000000000000 |
2077 |
9001010000020002001053796d626f6c0002040000002d01000004000000f001010008000000320a600176090100000070000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01010004000000f00100000300000000001100 |
2078 |
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f |
2079 |
6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200d5d17000000000000000 |
2080 |
d4bd4900a08f49000000000003010103010a010288330002822e00028831000288340002883100028835000288390002010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
2081 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000c000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
2082 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000e00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
2083 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f0000008c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
2084 |
ffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088320002883600028835000288330002863c000284c00302863c000288330002822e000288310002883400028831000288350002883900028832000288360002883500028834 |
2085 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2086 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2087 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2088 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn6 {\pict\wmetafile8\picw5679\pich493\picwgoal3220\pichgoal279 |
2089 |
010009000003050100000200150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02c00120141200000026060f001a00ffffffff000010000000c0ffffffc6ffffffe0130000860100000b00000026060f |
2090 |
000c004d617468547970650000300015000000fb0280fe0000000000009001000000000402001054696d6573204e657720526f6d616e0000bf040000002d0100000c000000320a60012a0d090000003134313539323635340008000000320a6001ca0c010000002e0008000000320a60010a0c0100000033000c000000320a |
2091 |
60014e01090000003134313539323635330008000000320a6001ee00010000002e0008000000320a60012e0001000000330010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010004000000f001000008000000320a6001de0a010000003c0008000000320a60015c08010000 |
2092 |
003c0010000000fb0280fe0000000000009001010000020002001053796d626f6c0002040000002d01000004000000f001010008000000320a600176090100000070000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d010100 |
2093 |
04000000f001000003000000000011000000000000035202000000000000000100796d62000e46000000000000350d5f0002601100383438000008000000320a0002fa0700000000}}}}} |
2094 |
\par \pard \widctlpar |
2095 |
\par If the CF algorithms presented give the same results for both 3.141592653 and 3.141592654, then the correct Farey neighbors of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} are identified. |
2096 |
\par |
2097 |
\par Using 3.141592653 as a rational approximation gives 103,638/32,989 and 103,993/33,102 as the best approximations in F{\sub 65535}. Using 3.141592654 as a rational approximation gives 104,348/33,215 and 104,703/33,328 as the best approximations in F{\sub |
2098 |
65,535}. The results are not identical, so neither pair of neighbors can be trusted to be the correct pair. |
2099 |
\par |
2100 |
\par |
2101 |
\par \page |
2102 |
\par {\*\bkmkstart _Toc498721707}{\pntext\pard\plain\b\i\f5 4.17\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Upper Bound On Distance Between Farey Terms In An Interval [FNDMAX]{\*\bkmkend _Toc498721707} |
2103 |
|
2104 |
\par \pard\plain \widctlpar \f4\fs20 |
2105 |
\par {\*\bkmkstart _Toc498721708}{\pntext\pard\plain\f5 4.17.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721708} |
2106 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap fndmax LL UL N |
2107 |
\par }\pard \li720\widctlpar Calculates an upper bound on the maximum distance between terms of F{\sub N} in the interval [LL,UL] using the techniques developed in the TOMS paper. LL and UL must both be in F{\sub N}, and LL and UL must be non-negative. |
2108 |
\par \pard \widctlpar |
2109 |
\par {\*\bkmkstart _Toc498721709}{\pntext\pard\plain\f5 4.17.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721709} |
2110 |
\par \pard\plain \widctlpar \f4\fs20 Applies the continued fraction algorithms described in the TOMS paper to find the rational number with the the smallest denominator in the interval [LL, UL], and to place an upper bound on the distance between terms in F{ |
2111 |
\sub N}. |
2112 |
\par |
2113 |
\par The results in the TOMS paper state the distance in terms of an upper bound on the distance between r{\sub A} and r{\sub I}, i.e. |
2114 |
\par |
2115 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw3900\objh700{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000120000 |
2116 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2117 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2118 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2119 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2120 |
fffffffffffffffffdffffff06000000feffffff040000000500000007000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2121 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2122 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2123 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2124 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c000000000000046000000000000000000000000a070 |
2125 |
34df674dc00103000000400600000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
2126 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
2127 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
2128 |
00000000000000000000000003000000a803000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f0000001000000011000000feffffff13000000fefffffffeffffff160000001700000018000000feffffffffff |
2129 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2130 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2131 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2132 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800df1a0000d20400003c0f0000bc0200000000 |
2133 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800df1ad2040000010009000003d001000003001500000000000500 |
2134 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02600460181200000026060f001a00ffffffff000010000000c0ffffffb6ffffff20180000160400000b00000026060f000c004d617468547970650000e00009000000 |
2135 |
fa02000010000000000000002200040000002d0100000500000014021c0276000500000013021c0276010500000014024a004800050000001302ee0348000500000014024a009c01050000001302ee039c010500000014021c02ee050500000013021c021e1815000000fb0280fe00000000000090010100000000020010 |
2136 |
54696d6573204e657720526f6d616e00008d040000002d01010009000000320a8a019600010000006800c00009000000320aa8039600010000006b00aa0009000000320aa0022903010000007200950009000000320aa803c806010000007100c00009000000320aa803d00c010000007100c00009000000320aa8033b10 |
2137 |
010000006b00aa0009000000320aa803ab14010000007100c00015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f001010009000000320a0003b4030100000049004a000c000000320a0804b507030000004d494e00ba004a009400 |
2138 |
0c000000320a0804bd0d030000004d494e00ba004a0094000c000000320a08041b11030000004d415800ba00880088000c000000320a08049815030000004d494e00ba004a00940010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d01010004000000f001020009000000320a |
2139 |
a0020802010000002d00d30009000000320aa002ae04010000003c00d30009000000320aa8038a13010000002d00d30015000000fb0280fe0000000000009001000000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f001010009000000320a8a01ac0e010000003100c0000900 |
2140 |
0000320aa8030206010000003200c0000d000000320aa803b109040000006d6178282b01aa00c000800009000000320aa803ab0f010000002c00600009000000320aa803861701000000290080000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374 |
2141 |
656d0000040000002d01010004000000f00102000300000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b00000045 |
2142 |
71756174696f6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200bbd4bc00 |
2143 |
0000f4894a0054804a0000000000587a4a0002010102010a010304000001030e000001128368000112836b0000000296610296620002862d128372030f01000b011283490011000a02863c030e0000010288310001028832128371030f01000b0112834d12834912834e0011000a02980812826d12826112827802822812 |
2144 |
8371030f01000b0112834d12834912834e0011000a02822c12836b030f01000b0112834d1283411283580011000a02862d128371030f0100010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300 |
2145 |
000005000000ffffffff00000000000000000000000000000000000000000000000000000000000000000000000012000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201 |
2146 |
ffffffff06000000ffffffff0000000000000000000000000000000000000000000000000000000000000000000000001400000004000000000000004500710075006100740069006f006e0020004e0061007400690076006500000000000000000000000000000000000000000000000000000000000000000000002000 |
2147 |
0200ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000015000000d80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2148 |
00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0112834d12834912834e0011000a0282290000000001000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2149 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2150 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2151 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2152 |
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw6879\pich1234\picwgoal3900\pichgoal700 |
2153 |
010009000003d00100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02600460181200000026060f001a00ffffffff000010000000c0ffffffb6ffffff20180000160400000b00000026060f |
2154 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d0100000500000014021c0276000500000013021c0276010500000014024a004800050000001302ee0348000500000014024a009c01050000001302ee039c010500000014021c02ee050500000013021c021e1815000000fb02 |
2155 |
80fe0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01010009000000320a8a019600010000006800c00009000000320aa8039600010000006b00aa0009000000320aa0022903010000007200950009000000320aa803c806010000007100c00009000000320aa803d00c01 |
2156 |
0000007100c00009000000320aa8033b10010000006b00aa0009000000320aa803ab14010000007100c00015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f001010009000000320a0003b4030100000049004a000c000000320a0804 |
2157 |
b507030000004d494e00ba004a0094000c000000320a0804bd0d030000004d494e00ba004a0094000c000000320a08041b11030000004d415800ba00880088000c000000320a08049815030000004d494e00ba004a00940010000000fb0280fe0000000000009001000000020002001053796d626f6c0002040000002d0101 |
2158 |
0004000000f001020009000000320aa0020802010000002d00d30009000000320aa002ae04010000003c00d30009000000320aa8038a13010000002d00d30015000000fb0280fe0000000000009001000000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f001010009000000320a |
2159 |
8a01ac0e010000003100c00009000000320aa8030206010000003200c0000d000000320aa803b109040000006d6178282b01aa00c000800009000000320aa803ab0f010000002c00600009000000320aa803861701000000290080000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc |
2160 |
02000000000102022253797374656d0000040000002d01010004000000f001020003000000000000303638005f546f0034393800313838}}}}} |
2161 |
\par \pard \widctlpar |
2162 |
\par However, this command calculates the distance as an upper bound on the distance between consecutive Farey terms, which is twice the result above. The formula used by this command to obtain a result is: |
2163 |
\par |
2164 |
\par \pard \qc\widctlpar {\pard\plain \qc\widctlpar \f4\fs20 {\object\objemb\objw3700\objh680{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
2165 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2166 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2167 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2168 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2169 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2170 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2171 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2172 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2173 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c0000000000000460000000000000000000000006098 |
2174 |
3ddf674dc00103000000800500000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
2175 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
2176 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
2177 |
000000000000000000000000030000002003000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c0000000d0000000e0000000f000000feffffff11000000fefffffffeffffff1400000015000000feffffffffffffffffffffffffffffffffff |
2178 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2179 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2180 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2181 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c00000000000000000008007e190000af040000740e0000a80200000000 |
2182 |
0000000000000000000000000000e8030000e80300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008007e19af0400000100090000038c01000003001500000000000500 |
2183 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400420171200000026060f001a00ffffffff000010000000c0ffffffb6ffffffe0160000f60300000b00000026060f000c004d617468547970650000e00009000000 |
2184 |
fa02000010000000000000002200040000002d010000050000001402fc016005050000001302fc01ca1615000000fb0280fe0000000000009001010000000002001054696d6573204e657720526f6d616e000087040000002d01010010000000320a8002340006000000726573756c749500aa009500c0006b006b000900 |
2185 |
0000320a88037405010000007100c00009000000320a88037c0b010000007100c00009000000320a8803e70e010000006b00aa0009000000320a88035713010000007100c00015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e000087040000002d01020004000000f001 |
2186 |
01000c000000320ae8036106030000004d494e00ba004a0094000c000000320ae803690c030000004d494e00ba004a0094000c000000320ae803c70f030000004d415800ba00880088000c000000320ae8034414030000004d494e00ba004a00940010000000fb0280fe0000000000009001000000020002001053796d62 |
2187 |
6f6c0002040000002d01010004000000f001020009000000320a80021a04010000003d00d30009000000320a88033612010000002d00d30015000000fb0280fe0000000000009001000000000002001054696d6573204e657720526f6d616e000087040000002d01020004000000f001010009000000320a6a01bb0d0100 |
2188 |
00003100c0000d000000320a88035d08040000006d6178282b01aa00c000800009000000320a8803570e010000002c00600009000000320a8803321601000000290080000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01 |
2189 |
010004000000f00102000300000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
2190 |
ffff00000000000000000000000000000000000000000000000000000000000000000000000010000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
2191 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000001200000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
2192 |
ffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000013000000b8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
2193 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100feff030a0000ffffffff02ce020000000000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e |
2194 |
000b0000004571756174696f6e2e3300f439b2710000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c000000 |
2195 |
0200bbd49c000000448b4a00cc894a0000000000a4874a0002010102010a0112837212836512837312837512836c12837402863d030e0000010288310001128371030f01000b0112834d12834912834e0011000a02980812826d128261128278028228128371030f01000b0112834d12834912834e0011000a02822c1283 |
2196 |
6b030f01000b0112834d1283411283580011000a02862d128371030f01000b0112834d12834912834e0011000a028229000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2197 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn28 {\pict\wmetafile8\picw6526\pich1199\picwgoal3700\pichgoal680 |
2198 |
0100090000038c0100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02400420171200000026060f001a00ffffffff000010000000c0ffffffb6ffffffe0160000f60300000b00000026060f |
2199 |
000c004d617468547970650000e00009000000fa02000010000000000000002200040000002d010000050000001402fc016005050000001302fc01ca1615000000fb0280fe0000000000009001010000000002001054696d6573204e657720526f6d616e000087040000002d01010010000000320a80023400060000007265 |
2200 |
73756c749500aa009500c0006b006b0009000000320a88037405010000007100c00009000000320a88037c0b010000007100c00009000000320a8803e70e010000006b00aa0009000000320a88035713010000007100c00015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e |
2201 |
000087040000002d01020004000000f00101000c000000320ae8036106030000004d494e00ba004a0094000c000000320ae803690c030000004d494e00ba004a0094000c000000320ae803c70f030000004d415800ba00880088000c000000320ae8034414030000004d494e00ba004a00940010000000fb0280fe00000000 |
2202 |
00009001000000020002001053796d626f6c0002040000002d01010004000000f001020009000000320a80021a04010000003d00d30009000000320a88033612010000002d00d30015000000fb0280fe0000000000009001000000000002001054696d6573204e657720526f6d616e000087040000002d01020004000000f0 |
2203 |
01010009000000320a6a01bb0d010000003100c0000d000000320a88035d08040000006d6178282b01aa00c000800009000000320a8803570e010000002c00600009000000320a8803321601000000290080000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc020000000001020222 |
2204 |
53797374656d0000040000002d01010004000000f00102000300000000000034393800353131006f633400383731}}}}} |
2205 |
\par \pard \widctlpar |
2206 |
\par {\*\bkmkstart _Toc498721710}{\pntext\pard\plain\f5 4.17.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721710} |
2207 |
\par \pard\plain \widctlpar \f4\fs20 The example invocation below is the same example as at the end of the TOMS paper. Note that the upper bound obtained is twice the value in the TOMS paper, for the reasons discussed above. |
2208 |
\par |
2209 |
\par {\f11\fs16 c:\\>rap fndmax 0.385 0.386 500 |
2210 |
\par ------------------------------------------------------------------------------ |
2211 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
2212 |
\par ------------------------------------------------------------------------------ |
2213 |
\par l_h: 77 ( 2 digits) |
2214 |
\par ------------------------------------------------------------------------------ |
2215 |
\par l_k: 200 ( 3 digits) |
2216 |
\par ------------------------------------------------------------------------------ |
2217 |
\par r_h: 193 ( 3 digits) |
2218 |
\par ------------------------------------------------------------------------------ |
2219 |
\par r_k: 500 ( 3 digits) |
2220 |
\par ------------------------------------------------------------------------------ |
2221 |
\par k_max: 500 ( 3 digits) |
2222 |
\par ------------------------------------------------------------------------------ |
2223 |
\par dap_D: 1, ( 109 digits) |
2224 |
\par 000,000,000,000,000,000,000,000,000, |
2225 |
\par 000,000,000,000,000,000,000,000,000, |
2226 |
\par 000,000,000,000,000,000,000,000,000, |
2227 |
\par 000,000,000,000,000,000,000,000,000 |
2228 |
\par ------------------------------------------------------------------------------ |
2229 |
\par midpoint_h: 771 ( 3 digits) |
2230 |
\par ------------------------------------------------------------------------------ |
2231 |
\par midpoint_k: 2,000 ( 4 digits) |
2232 |
\par ------------------------------------------------------------------------------ |
2233 |
\par ***************** CF Representation Of Interval Midpoint ***************** |
2234 |
\par ************************ Inputs To CF Calculation ************************ |
2235 |
\par ------------------------------------------------------------------------------ |
2236 |
\par h_in: 771 ( 3 digits) |
2237 |
\par ------------------------------------------------------------------------------ |
2238 |
\par k_in: 2,000 ( 4 digits) |
2239 |
\par ------------------------------------------------------------------------------ |
2240 |
\par ************************** CF Partial Quotients ************************** |
2241 |
\par ------------------------------------------------------------------------------ |
2242 |
\par a(0): 0 ( 1 digit) |
2243 |
\par ------------------------------------------------------------------------------ |
2244 |
\par a(1): 2 ( 1 digit) |
2245 |
\par ------------------------------------------------------------------------------ |
2246 |
\par a(2): 1 ( 1 digit) |
2247 |
\par ------------------------------------------------------------------------------ |
2248 |
\par a(3): 1 ( 1 digit) |
2249 |
\par ------------------------------------------------------------------------------ |
2250 |
\par a(4): 2 ( 1 digit) |
2251 |
\par ------------------------------------------------------------------------------ |
2252 |
\par a(5): 6 ( 1 digit) |
2253 |
\par ------------------------------------------------------------------------------ |
2254 |
\par a(6): 3 ( 1 digit) |
2255 |
\par ------------------------------------------------------------------------------ |
2256 |
\par a(7): 3 ( 1 digit) |
2257 |
\par ------------------------------------------------------------------------------ |
2258 |
\par a(8): 2 ( 1 digit) |
2259 |
\par ------------------------------------------------------------------------------ |
2260 |
\par ***************************** CF Convergents ***************************** |
2261 |
\par ------------------------------------------------------------------------------ |
2262 |
\par p(0): 0 ( 1 digit) |
2263 |
\par q(0): 1 ( 1 digit) |
2264 |
\par ------------------------------------------------------------------------------ |
2265 |
\par p(1): 1 ( 1 digit) |
2266 |
\par q(1): 2 ( 1 digit) |
2267 |
\par ------------------------------------------------------------------------------ |
2268 |
\par p(2): 1 ( 1 digit) |
2269 |
\par q(2): 3 ( 1 digit) |
2270 |
\par ------------------------------------------------------------------------------ |
2271 |
\par p(3): 2 ( 1 digit) |
2272 |
\par q(3): 5 ( 1 digit) |
2273 |
\par ------------------------------------------------------------------------------ |
2274 |
\par p(4): 5 ( 1 digit) |
2275 |
\par q(4): 13 ( 2 digits) |
2276 |
\par ------------------------------------------------------------------------------ |
2277 |
\par p(5): 32 ( 2 digits) |
2278 |
\par q(5): 83 ( 2 digits) |
2279 |
\par ------------------------------------------------------------------------------ |
2280 |
\par p(6): 101 ( 3 digits) |
2281 |
\par q(6): 262 ( 3 digits) |
2282 |
\par ------------------------------------------------------------------------------ |
2283 |
\par p(7): 335 ( 3 digits) |
2284 |
\par q(7): 869 ( 3 digits) |
2285 |
\par ------------------------------------------------------------------------------ |
2286 |
\par p(8): 771 ( 3 digits) |
2287 |
\par q(8): 2,000 ( 4 digits) |
2288 |
\par ------------------------------------------------------------------------------ |
2289 |
\par ******** A Rational Number With Smallest Denominator In Interval ******** |
2290 |
\par ------------------------------------------------------------------------------ |
2291 |
\par result_h: 22 ( 2 digits) |
2292 |
\par ------------------------------------------------------------------------------ |
2293 |
\par result_k: 57 ( 2 digits) |
2294 |
\par ------------------------------------------------------------------------------ |
2295 |
\par ***** Upper Bound On Distance Between Farey Terms As Rational Number ***** |
2296 |
\par ------------------------------------------------------------------------------ |
2297 |
\par error_ub_h: 1 ( 1 digit) |
2298 |
\par ------------------------------------------------------------------------------ |
2299 |
\par error_up_k: 25,251 ( 5 digits) |
2300 |
\par ------------------------------------------------------------------------------ |
2301 |
\par ** Upper Bound On Distance Between Farey Terms As Decimal Approximation ** |
2302 |
\par ------------------------------------------------------------------------------ |
2303 |
\par dap_h: 39,602,391,984,475,862,342,085, ( 104 digits) |
2304 |
\par 461,961,902,498,910,934,220,426,913, |
2305 |
\par 785,592,649,796,047,681,279,949,308, |
2306 |
\par 938,259,870,896,202,130,608,688,764 |
2307 |
\par ------------------------------------------------------------------------------ |
2308 |
\par dap_k: 1, ( 109 digits) |
2309 |
\par 000,000,000,000,000,000,000,000,000, |
2310 |
\par 000,000,000,000,000,000,000,000,000, |
2311 |
\par 000,000,000,000,000,000,000,000,000, |
2312 |
\par 000,000,000,000,000,000,000,000,000 |
2313 |
\par ------------------------------------------------------------------------------ |
2314 |
\par RAP execution ends. |
2315 |
\par ------------------------------------------------------------------------------} |
2316 |
\par \page |
2317 |
\par {\*\bkmkstart _Toc498721711}{\pntext\pard\plain\b\i\f5 4.18\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Enclosing Rational Numbers In A Rectangular Area Of The Integer Lattice [FAB] |
2318 |
{\*\bkmkend _Toc498721711} |
2319 |
\par \pard\plain \widctlpar \f4\fs20 |
2320 |
\par {\*\bkmkstart _Toc498721712}{\pntext\pard\plain\f5 4.18.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721712} |
2321 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap fab R1 HMAX KMAX |
2322 |
\par }\pard \li720\widctlpar Finds the two rational numbers in {\pard\plain \li720\widctlpar \f4\fs20 {\object\objemb\objw1120\objh380{\*\objclass Equation.3}{\*\objdata 01050000020000000b0000004571756174696f6e2e3300000000000000000000100000 |
2323 |
d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff0900060000000000000000000000010000000100000000000000001000000200000001000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2324 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2325 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2326 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2327 |
fffffffffffffffffdffffff05000000feffffff0400000006000000fefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2328 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2329 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2330 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2331 |
ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffff0200000002ce020000000000c0000000000000460000000000000000000000006098 |
2332 |
3ddf674dc00103000000800400000000000001004f006c00650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000201ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 |
2333 |
0000000000000000000000001400000000000000030050004900430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0002010100000004000000ffffffff0000000000000000000000000000000000000000000000000000 |
2334 |
00000000000000000000010000004c0000000000000003004d004500540041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000201ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 |
2335 |
000000000000000000000000030000007802000000000000feffffff02000000feffffff0400000005000000060000000700000008000000090000000a0000000b0000000c000000feffffff0e000000fefffffffeffffff11000000feffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2336 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2337 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2338 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff |
2339 |
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000020400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c0000000000000000000800b70700009e020000600400007c0100000000 |
2340 |
0000000000000000000000000000e8030000e8030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800b7079e0200000100090000033701000003001500000000000500 |
2341 |
00000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02600200071200000026060f001a00ffffffff000010000000c0ffffffc0ffffffc0060000200200000b00000026060f000c004d617468547970650000800009000000 |
2342 |
fa02000009000000000000002200040000002d0100000500000014021c0117040500000013021c01b8040500000014021c01c4040500000013021c017e050500000014021c0172050500000013021c01fa050500000014021c011b060500000013021c01a30615000000fb0280fe00000000000090010100000000020010 |
2343 |
54696d6573204e657720526f6d616e00008d040000002d01010009000000320a60014c00010000004600ea0015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f00101000d000000320adf012b01040000004b4d41589400ba008800 |
2344 |
880009000000320adf010204010000004800a10009000000320adf01b104010000004d00ba0009000000320adf016d05010000004100880009000000320adf010406010000005800880015000000fb0220ff0000000000009001000000000002001054696d6573204e657720526f6d616e00008d040000002d0101000400 |
2345 |
0000f001020009000000320adf01b903010000002c0038000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f0010100030000000000000000000000000000000100feff030a0000ffffffff02ce02000000 |
2346 |
0000c000000000000046170000004d6963726f736f6674204571756174696f6e20332e30000c0000004453204571756174696f6e000b0000004571756174696f6e2e3300f439b271000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000 |
2347 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010043006f006d0070004f0062006a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000120002000300000005000000ffff |
2348 |
ffff0000000000000000000000000000000000000000000000000000000000000000000000000d000000660000000000000003004f0062006a0049006e0066006f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000201ffffffff06000000 |
2349 |
ffffffff0000000000000000000000000000000000000000000000000000000000000000000000000f00000004000000000000004500710075006100740069006f006e0020004e00610074006900760065000000000000000000000000000000000000000000000000000000000000000000000020000200ffffffffffff |
2350 |
ffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000001000000058000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff |
2351 |
ffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c0000000200b2d53c000000f4894a0054804a0000000000587a4a0002010102010a01128346030f01000b0112834b12834d12834112835802822c32834806110032834d0611 |
2352 |
003283410611003283580611000011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2353 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2354 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
2355 |
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105000000000000}{\result {\dn16 {\pict\wmetafile8\picw1975\pich670\picwgoal1120\pichgoal380 |
2356 |
010009000003370100000300150000000000050000000902000000000400000002010100050000000102ffffff00040000002e01180005000000310201000000050000000b0200000000050000000c02600200071200000026060f001a00ffffffff000010000000c0ffffffc0ffffffc0060000200200000b00000026060f |
2357 |
000c004d617468547970650000800009000000fa02000009000000000000002200040000002d0100000500000014021c0117040500000013021c01b8040500000014021c01c4040500000013021c017e050500000014021c0172050500000013021c01fa050500000014021c011b060500000013021c01a30615000000fb02 |
2358 |
80fe0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01010009000000320a60014c00010000004600ea0015000000fb0220ff0000000000009001010000000002001054696d6573204e657720526f6d616e00008d040000002d01020004000000f00101000d000000320adf |
2359 |
012b01040000004b4d41589400ba008800880009000000320adf010204010000004800a10009000000320adf01b104010000004d00ba0009000000320adf016d05010000004100880009000000320adf010406010000005800880015000000fb0220ff0000000000009001000000000002001054696d6573204e657720526f |
2360 |
6d616e00008d040000002d01010004000000f001020009000000320adf01b903010000002c0038000a00000026060f000a00ffffffff01000000000010000000fb021000070000000000bc02000000000102022253797374656d0000040000002d01020004000000f00101000300000000000000005f546f00343938003837 |
2361 |
3000c903c900c903c900380d5f006f6334}}}}} which enclose the non-negative rational number R1. |
2362 |
\par \pard \widctlpar {\b rap fab R1 HMAX KMAX NNEIGHBORS D |
2363 |
\par }\pard \li720\widctlpar Same as above but provides NNEIGHBORS terms in F{\sub KMAX,HMAX} on both the left and right, and will emit decimal approximations with denominator D. |
2364 |
\par {\*\bkmkstart _Toc498721713}{\pntext\pard\plain\f5 4.18.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721713} |
2365 |
\par \pard\plain \widctlpar \f4\fs20 Applies the continued fraction algorithms described in the TOMS paper to obtain neighbors to an arbitrary non-negative rational number R1 in F{\sub KMAX,HMAX} |
2366 |
. There are two cases to consider: either the supplied rational number R1 is in F{\sub KMAX,HMAX}, or it is not. The algorithm will announce clearly which case applies. In either case, the algorithm applied is nearly identical. |
2367 |
\par |
2368 |
\par {\*\bkmkstart _Toc498721714}{\pntext\pard\plain\f5 4.18.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721714} |
2369 |
\par \pard\plain \widctlpar \f4\fs20 The invocation below shows RAP used to find the neighbors to 0.31830989 (approximately 1/{{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}) in the rectangular area of the integer lattice bounded by h{ |
2370 |
{\field{\*\fldinst SYMBOL 163 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}193 and k{{\field{\*\fldinst SYMBOL 163 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}}500. Although it isn\rquote t shown below, RAP handles all of the boundary cases at the \ldblquote |
2371 |
corner\rdblquote near h/k=193/500. The output below includes narrative explanations in a different font and with shading. |
2372 |
\par |
2373 |
\par {\f11\fs16 c:\\>rap fab 0.31830989 193 500 2 1e54 |
2374 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 In the command-line invocation above, \ldblquote 2\rdblquote tells RAP to display 2 neighbors on each side of the rational number to be approximated, and \ldblquote 1e54\rdblquote |
2375 |
is the DAP denominator, which indicates that two lines of digits after the decimal point are desired (see the DAP command). |
2376 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2377 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
2378 |
\par ------------------------------------------------------------------------------ |
2379 |
\par **************** Rational Number h_in/k_in To Approximate **************** |
2380 |
\par ------------------------------------------------------------------------------ |
2381 |
\par h_in: 31,830,989 ( 8 digits) |
2382 |
\par ------------------------------------------------------------------------------ |
2383 |
\par k_in: 100,000,000 ( 9 digits) |
2384 |
\par ------------------------------------------------------------------------------ |
2385 |
\par *********************** Other Solution Parameters *********************** |
2386 |
\par ------------------------------------------------------------------------------ |
2387 |
\par hmax: 193 ( 3 digits) |
2388 |
\par ------------------------------------------------------------------------------ |
2389 |
\par kmax: 500 ( 3 digits) |
2390 |
\par ------------------------------------------------------------------------------ |
2391 |
\par NNEIGHBORS: 2 ( 1 digit) |
2392 |
\par ------------------------------------------------------------------------------ |
2393 |
\par DAP Denominator: 1, ( 55 digits) |
2394 |
\par 000,000,000,000,000,000,000,000,000, |
2395 |
\par 000,000,000,000,000,000,000,000,000 |
2396 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 Below are the continued fraction partial quotients and convergents of the rational number to be approximated. These are necessary to economically locate the immediate Farey neighbors along the |
2397 |
\ldblquote right wall\rdblquote of the rectangular area of the integer lattice, if this proves necessary. |
2398 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2399 |
\par *************** Continued Fraction Expansion Of h_in/k_in *************** |
2400 |
\par ------------------------------------------------------------------------------ |
2401 |
\par ************************ Inputs To CF Calculation ************************ |
2402 |
\par ------------------------------------------------------------------------------ |
2403 |
\par h_in: 31,830,989 ( 8 digits) |
2404 |
\par ------------------------------------------------------------------------------ |
2405 |
\par k_in: 100,000,000 ( 9 digits) |
2406 |
\par ------------------------------------------------------------------------------ |
2407 |
\par ************************** CF Partial Quotients ************************** |
2408 |
\par ------------------------------------------------------------------------------ |
2409 |
\par a(0): 0 ( 1 digit) |
2410 |
\par ------------------------------------------------------------------------------ |
2411 |
\par a(1): 3 ( 1 digit) |
2412 |
\par ------------------------------------------------------------------------------ |
2413 |
\par a(2): 7 ( 1 digit) |
2414 |
\par ------------------------------------------------------------------------------ |
2415 |
\par a(3): 15 ( 2 digits) |
2416 |
\par ------------------------------------------------------------------------------ |
2417 |
\par a(4): 1 ( 1 digit) |
2418 |
\par ------------------------------------------------------------------------------ |
2419 |
\par a(5): 256 ( 3 digits) |
2420 |
\par ------------------------------------------------------------------------------ |
2421 |
\par a(6): 3 ( 1 digit) |
2422 |
\par ------------------------------------------------------------------------------ |
2423 |
\par a(7): 5 ( 1 digit) |
2424 |
\par ------------------------------------------------------------------------------ |
2425 |
\par a(8): 5 ( 1 digit) |
2426 |
\par ------------------------------------------------------------------------------ |
2427 |
\par a(9): 13 ( 2 digits) |
2428 |
\par ------------------------------------------------------------------------------ |
2429 |
\par ***************************** CF Convergents ***************************** |
2430 |
\par ------------------------------------------------------------------------------ |
2431 |
\par p(0): 0 ( 1 digit) |
2432 |
\par q(0): 1 ( 1 digit) |
2433 |
\par ------------------------------------------------------------------------------ |
2434 |
\par p(1): 1 ( 1 digit) |
2435 |
\par q(1): 3 ( 1 digit) |
2436 |
\par ------------------------------------------------------------------------------ |
2437 |
\par p(2): 7 ( 1 digit) |
2438 |
\par q(2): 22 ( 2 digits) |
2439 |
\par ------------------------------------------------------------------------------ |
2440 |
\par p(3): 106 ( 3 digits) |
2441 |
\par q(3): 333 ( 3 digits) |
2442 |
\par ------------------------------------------------------------------------------ |
2443 |
\par p(4): 113 ( 3 digits) |
2444 |
\par q(4): 355 ( 3 digits) |
2445 |
\par ------------------------------------------------------------------------------ |
2446 |
\par p(5): 29,034 ( 5 digits) |
2447 |
\par q(5): 91,213 ( 5 digits) |
2448 |
\par ------------------------------------------------------------------------------ |
2449 |
\par p(6): 87,215 ( 5 digits) |
2450 |
\par q(6): 273,994 ( 6 digits) |
2451 |
\par ------------------------------------------------------------------------------ |
2452 |
\par p(7): 465,109 ( 6 digits) |
2453 |
\par q(7): 1,461,183 ( 7 digits) |
2454 |
\par ------------------------------------------------------------------------------ |
2455 |
\par p(8): 2,412,760 ( 7 digits) |
2456 |
\par q(8): 7,579,909 ( 7 digits) |
2457 |
\par ------------------------------------------------------------------------------ |
2458 |
\par p(9): 31,830,989 ( 8 digits) |
2459 |
\par q(9): 100,000,000 ( 9 digits) |
2460 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 |
2461 |
Below are the continued fraction partial quotients and convergents of the reciprocal of the rational number to be approximated. These are necessary to economically locate the immediate Farey neighbors along the \ldblquote top wall\rdblquote |
2462 |
of the rectangular area of the integer lattice, if this proves necessary. |
2463 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2464 |
\par *************** Continued Fraction Expansion Of k_in/h_in *************** |
2465 |
\par ------------------------------------------------------------------------------ |
2466 |
\par ************************ Inputs To CF Calculation ************************ |
2467 |
\par ------------------------------------------------------------------------------ |
2468 |
\par h_in: 100,000,000 ( 9 digits) |
2469 |
\par ------------------------------------------------------------------------------ |
2470 |
\par k_in: 31,830,989 ( 8 digits) |
2471 |
\par ------------------------------------------------------------------------------ |
2472 |
\par ************************** CF Partial Quotients ************************** |
2473 |
\par ------------------------------------------------------------------------------ |
2474 |
\par a(0): 3 ( 1 digit) |
2475 |
\par ------------------------------------------------------------------------------ |
2476 |
\par a(1): 7 ( 1 digit) |
2477 |
\par ------------------------------------------------------------------------------ |
2478 |
\par a(2): 15 ( 2 digits) |
2479 |
\par ------------------------------------------------------------------------------ |
2480 |
\par a(3): 1 ( 1 digit) |
2481 |
\par ------------------------------------------------------------------------------ |
2482 |
\par a(4): 256 ( 3 digits) |
2483 |
\par ------------------------------------------------------------------------------ |
2484 |
\par a(5): 3 ( 1 digit) |
2485 |
\par ------------------------------------------------------------------------------ |
2486 |
\par a(6): 5 ( 1 digit) |
2487 |
\par ------------------------------------------------------------------------------ |
2488 |
\par a(7): 5 ( 1 digit) |
2489 |
\par ------------------------------------------------------------------------------ |
2490 |
\par a(8): 13 ( 2 digits) |
2491 |
\par ------------------------------------------------------------------------------ |
2492 |
\par ***************************** CF Convergents ***************************** |
2493 |
\par ------------------------------------------------------------------------------ |
2494 |
\par p(0): 3 ( 1 digit) |
2495 |
\par q(0): 1 ( 1 digit) |
2496 |
\par ------------------------------------------------------------------------------ |
2497 |
\par p(1): 22 ( 2 digits) |
2498 |
\par q(1): 7 ( 1 digit) |
2499 |
\par ------------------------------------------------------------------------------ |
2500 |
\par p(2): 333 ( 3 digits) |
2501 |
\par q(2): 106 ( 3 digits) |
2502 |
\par ------------------------------------------------------------------------------ |
2503 |
\par p(3): 355 ( 3 digits) |
2504 |
\par q(3): 113 ( 3 digits) |
2505 |
\par ------------------------------------------------------------------------------ |
2506 |
\par p(4): 91,213 ( 5 digits) |
2507 |
\par q(4): 29,034 ( 5 digits) |
2508 |
\par ------------------------------------------------------------------------------ |
2509 |
\par p(5): 273,994 ( 6 digits) |
2510 |
\par q(5): 87,215 ( 5 digits) |
2511 |
\par ------------------------------------------------------------------------------ |
2512 |
\par p(6): 1,461,183 ( 7 digits) |
2513 |
\par q(6): 465,109 ( 6 digits) |
2514 |
\par ------------------------------------------------------------------------------ |
2515 |
\par p(7): 7,579,909 ( 7 digits) |
2516 |
\par q(7): 2,412,760 ( 7 digits) |
2517 |
\par ------------------------------------------------------------------------------ |
2518 |
\par p(8): 100,000,000 ( 9 digits) |
2519 |
\par q(8): 31,830,989 ( 8 digits) |
2520 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 Below are the continued fraction partial quotients and convergents of the corner point [i.e. (k{\sub MAX}, h{\sub MAX} |
2521 |
)]. These are necessary to economically locate the immediate Farey neighbor just to the left on the number line, along the \ldblquote right wall\rdblquote of the rectangular region of the integer lattice. |
2522 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2523 |
\par ************** Continued Fraction Expansion Of Corner Point ************** |
2524 |
\par ------------------------------------------------------------------------------ |
2525 |
\par ************************ Inputs To CF Calculation ************************ |
2526 |
\par ------------------------------------------------------------------------------ |
2527 |
\par h_in: 193 ( 3 digits) |
2528 |
\par ------------------------------------------------------------------------------ |
2529 |
\par k_in: 500 ( 3 digits) |
2530 |
\par ------------------------------------------------------------------------------ |
2531 |
\par ************************** CF Partial Quotients ************************** |
2532 |
\par ------------------------------------------------------------------------------ |
2533 |
\par a(0): 0 ( 1 digit) |
2534 |
\par ------------------------------------------------------------------------------ |
2535 |
\par a(1): 2 ( 1 digit) |
2536 |
\par ------------------------------------------------------------------------------ |
2537 |
\par a(2): 1 ( 1 digit) |
2538 |
\par ------------------------------------------------------------------------------ |
2539 |
\par a(3): 1 ( 1 digit) |
2540 |
\par ------------------------------------------------------------------------------ |
2541 |
\par a(4): 2 ( 1 digit) |
2542 |
\par ------------------------------------------------------------------------------ |
2543 |
\par a(5): 3 ( 1 digit) |
2544 |
\par ------------------------------------------------------------------------------ |
2545 |
\par a(6): 1 ( 1 digit) |
2546 |
\par ------------------------------------------------------------------------------ |
2547 |
\par a(7): 8 ( 1 digit) |
2548 |
\par ------------------------------------------------------------------------------ |
2549 |
\par ***************************** CF Convergents ***************************** |
2550 |
\par ------------------------------------------------------------------------------ |
2551 |
\par p(0): 0 ( 1 digit) |
2552 |
\par q(0): 1 ( 1 digit) |
2553 |
\par ------------------------------------------------------------------------------ |
2554 |
\par p(1): 1 ( 1 digit) |
2555 |
\par q(1): 2 ( 1 digit) |
2556 |
\par ------------------------------------------------------------------------------ |
2557 |
\par p(2): 1 ( 1 digit) |
2558 |
\par q(2): 3 ( 1 digit) |
2559 |
\par ------------------------------------------------------------------------------ |
2560 |
\par p(3): 2 ( 1 digit) |
2561 |
\par q(3): 5 ( 1 digit) |
2562 |
\par ------------------------------------------------------------------------------ |
2563 |
\par p(4): 5 ( 1 digit) |
2564 |
\par q(4): 13 ( 2 digits) |
2565 |
\par ------------------------------------------------------------------------------ |
2566 |
\par p(5): 17 ( 2 digits) |
2567 |
\par q(5): 44 ( 2 digits) |
2568 |
\par ------------------------------------------------------------------------------ |
2569 |
\par p(6): 22 ( 2 digits) |
2570 |
\par q(6): 57 ( 2 digits) |
2571 |
\par ------------------------------------------------------------------------------ |
2572 |
\par p(7): 193 ( 3 digits) |
2573 |
\par q(7): 500 ( 3 digits) |
2574 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 Below are the continued fraction partial quotients and convergents of the reciprocal of the corner point [i.e. (k{\sub MAX}, h{\sub MAX} |
2575 |
)]. These are necessary to economically locate the immediate Farey neighbor just to the right on the number line, along the \ldblquote top wall\rdblquote of the rectangular region of the integer lattice. |
2576 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2577 |
\par ******** Continued Fraction Expansion Of Corner Point Reciprocal ******** |
2578 |
\par ------------------------------------------------------------------------------ |
2579 |
\par ************************ Inputs To CF Calculation ************************ |
2580 |
\par ------------------------------------------------------------------------------ |
2581 |
\par h_in: 500 ( 3 digits) |
2582 |
\par ------------------------------------------------------------------------------ |
2583 |
\par k_in: 193 ( 3 digits) |
2584 |
\par ------------------------------------------------------------------------------ |
2585 |
\par ************************** CF Partial Quotients ************************** |
2586 |
\par ------------------------------------------------------------------------------ |
2587 |
\par a(0): 2 ( 1 digit) |
2588 |
\par ------------------------------------------------------------------------------ |
2589 |
\par a(1): 1 ( 1 digit) |
2590 |
\par ------------------------------------------------------------------------------ |
2591 |
\par a(2): 1 ( 1 digit) |
2592 |
\par ------------------------------------------------------------------------------ |
2593 |
\par a(3): 2 ( 1 digit) |
2594 |
\par ------------------------------------------------------------------------------ |
2595 |
\par a(4): 3 ( 1 digit) |
2596 |
\par ------------------------------------------------------------------------------ |
2597 |
\par a(5): 1 ( 1 digit) |
2598 |
\par ------------------------------------------------------------------------------ |
2599 |
\par a(6): 8 ( 1 digit) |
2600 |
\par ------------------------------------------------------------------------------ |
2601 |
\par ***************************** CF Convergents ***************************** |
2602 |
\par ------------------------------------------------------------------------------ |
2603 |
\par p(0): 2 ( 1 digit) |
2604 |
\par q(0): 1 ( 1 digit) |
2605 |
\par ------------------------------------------------------------------------------ |
2606 |
\par p(1): 3 ( 1 digit) |
2607 |
\par q(1): 1 ( 1 digit) |
2608 |
\par ------------------------------------------------------------------------------ |
2609 |
\par p(2): 5 ( 1 digit) |
2610 |
\par q(2): 2 ( 1 digit) |
2611 |
\par ------------------------------------------------------------------------------ |
2612 |
\par p(3): 13 ( 2 digits) |
2613 |
\par q(3): 5 ( 1 digit) |
2614 |
\par ------------------------------------------------------------------------------ |
2615 |
\par p(4): 44 ( 2 digits) |
2616 |
\par q(4): 17 ( 2 digits) |
2617 |
\par ------------------------------------------------------------------------------ |
2618 |
\par p(5): 57 ( 2 digits) |
2619 |
\par q(5): 22 ( 2 digits) |
2620 |
\par ------------------------------------------------------------------------------ |
2621 |
\par p(6): 500 ( 3 digits) |
2622 |
\par q(6): 193 ( 3 digits) |
2623 |
\par ------------------------------------------------------------------------------ |
2624 |
\par ************************* Corner Point Neighbors ************************* |
2625 |
\par ------------------------------------------------------------------------------ |
2626 |
\par corner_pred_h: 22 ( 2 digits) |
2627 |
\par corner_pred_k: 57 ( 2 digits) |
2628 |
\par ------------------------------------------------------------------------------ |
2629 |
\par corner_succ_h: 171 ( 3 digits) |
2630 |
\par corner_succ_k: 443 ( 3 digits) |
2631 |
\par ------------------------------------------------------------------------------ |
2632 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The lines below advise that the rational number to approximated is not in the rectangular area of the integer lattice (i.e. can\rquote |
2633 |
t be represented subject to the constraints). (This is the most typical case, as we seldom seek neighbors to a number we can represent exactly.) This means that none of the neighbors will be subscripted \ldblquote 0\rdblquote . |
2634 |
\par \pard \widctlpar {\f11\fs16 ****************************************************************************** |
2635 |
\par ******** h_in/k_in IS NOT In Rectangular Farey Series Of Interest ******** |
2636 |
\par ****************************************************************************** |
2637 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The statement below advises that the rational number to be approximated is less than h{\sub MAX}/k{\sub MAX} |
2638 |
\par (i.e. to the left of the corner point) in the rectangular area of the integer lattice formed by the constraints. All boundary cases are covered when the neighbors span the corner. |
2639 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2640 |
\par *********************** 0 <= h_in/k_in < hmax/kmax *********************** |
2641 |
\par ------------------------------------------------------------------------------ |
2642 |
\par ***************** Highest-Order Convergent With q(i)<=N ***************** |
2643 |
\par ------------------------------------------------------------------------------ |
2644 |
\par p(4): 113 ( 3 digits) |
2645 |
\par q(4): 355 ( 3 digits) |
2646 |
\par ------------------------------------------------------------------------------ |
2647 |
\par ******************* Accompanying Intermediate Fraction ******************* |
2648 |
\par ------------------------------------------------------------------------------ |
2649 |
\par intermediate_h: 106 ( 3 digits) |
2650 |
\par intermediate_k: 333 ( 3 digits) |
2651 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 Below is a typical neighbor. The subscript of \ldblquote -2\rdblquote indicates it is the second neighbor to the left on the number line from the number to be approximated, subject to the constrai |
2652 |
nts. |
2653 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2654 |
\par ****************** Rectangular Farey Neighbor Index -2 ****************** |
2655 |
\par ------------------------------------------------------------------------------ |
2656 |
\par h(-2): 120 ( 3 digits) |
2657 |
\par ------------------------------------------------------------------------------ |
2658 |
\par k(-2): 377 ( 3 digits) |
2659 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 Below, the number 120/377 is rephrased as a rational number with a larger denominator which is a power of ten. This says that this number is 0.318302\'85 |
2660 |
\par \pard \widctlpar {\f11\fs16 |
2661 |
\par ------------------------------------------------------------------------------ |
2662 |
\par DAP_N(-2): 318,302,387,267,904,509,283,819,628, ( 54 digits) |
2663 |
\par 647,214,854,111,405,835,543,766,578 |
2664 |
\par ------------------------------------------------------------------------------ |
2665 |
\par DAP_D(-2): 1, ( 55 digits) |
2666 |
\par 000,000,000,000,000,000,000,000,000, |
2667 |
\par 000,000,000,000,000,000,000,000,000 |
2668 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The error (the difference between the approximation and the number to be approximated) is supplied as a rational number. |
2669 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2670 |
\par error_h(-2): - 282,853 ( 6 digits) |
2671 |
\par ------------------------------------------------------------------------------ |
2672 |
\par error_k(-2): 37,700,000,000 ( 11 digits) |
2673 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The error just above is restated with a power-of-ten denominator. This says that the error is about -0.0000075\'85 |
2674 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2675 |
\par ERROR_DAP_N(-2): - 7,502,732,095,490,716,180,371, ( 49 digits) |
2676 |
\par 352,785,145,888,594,164,456,233,421 |
2677 |
\par ------------------------------------------------------------------------------ |
2678 |
\par ERROR_DAP_D(-2): 1, ( 55 digits) |
2679 |
\par 000,000,000,000,000,000,000,000,000, |
2680 |
\par 000,000,000,000,000,000,000,000,000 |
2681 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The same information described above is repeated for each neighbor. |
2682 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2683 |
\par ****************** Rectangular Farey Neighbor Index -1 ****************** |
2684 |
\par ------------------------------------------------------------------------------ |
2685 |
\par h(-1): 113 ( 3 digits) |
2686 |
\par ------------------------------------------------------------------------------ |
2687 |
\par k(-1): 355 ( 3 digits) |
2688 |
\par ------------------------------------------------------------------------------ |
2689 |
\par DAP_N(-1): 318,309,859,154,929,577,464,788,732, ( 54 digits) |
2690 |
\par 394,366,197,183,098,591,549,295,774 |
2691 |
\par ------------------------------------------------------------------------------ |
2692 |
\par DAP_D(-1): 1, ( 55 digits) |
2693 |
\par 000,000,000,000,000,000,000,000,000, |
2694 |
\par 000,000,000,000,000,000,000,000,000 |
2695 |
\par ------------------------------------------------------------------------------ |
2696 |
\par error_h(-1): - 219 ( 3 digits) |
2697 |
\par ------------------------------------------------------------------------------ |
2698 |
\par error_k(-1): 7,100,000,000 ( 10 digits) |
2699 |
\par ------------------------------------------------------------------------------ |
2700 |
\par ERROR_DAP_N(-1): - 30,845,070,422,535,211,267, ( 47 digits) |
2701 |
\par 605,633,802,816,901,408,450,704,225 |
2702 |
\par ------------------------------------------------------------------------------ |
2703 |
\par ERROR_DAP_D(-1): 1, ( 55 digits) |
2704 |
\par 000,000,000,000,000,000,000,000,000, |
2705 |
\par 000,000,000,000,000,000,000,000,000 |
2706 |
\par ------------------------------------------------------------------------------ |
2707 |
\par ******************* Rectangular Farey Neighbor Index 1 ******************* |
2708 |
\par ------------------------------------------------------------------------------ |
2709 |
\par h(1): 106 ( 3 digits) |
2710 |
\par ------------------------------------------------------------------------------ |
2711 |
\par k(1): 333 ( 3 digits) |
2712 |
\par ------------------------------------------------------------------------------ |
2713 |
\par DAP_N(1): 318,318,318,318,318,318,318,318,318, ( 54 digits) |
2714 |
\par 318,318,318,318,318,318,318,318,318 |
2715 |
\par ------------------------------------------------------------------------------ |
2716 |
\par DAP_D(1): 1, ( 55 digits) |
2717 |
\par 000,000,000,000,000,000,000,000,000, |
2718 |
\par 000,000,000,000,000,000,000,000,000 |
2719 |
\par ------------------------------------------------------------------------------ |
2720 |
\par error_h(1): 280,663 ( 6 digits) |
2721 |
\par ------------------------------------------------------------------------------ |
2722 |
\par error_k(1): 33,300,000,000 ( 11 digits) |
2723 |
\par ------------------------------------------------------------------------------ |
2724 |
\par ERROR_DAP_N(1): 8,428,318,318,318,318,318,318, ( 49 digits) |
2725 |
\par 318,318,318,318,318,318,318,318,318 |
2726 |
\par ------------------------------------------------------------------------------ |
2727 |
\par ERROR_DAP_D(1): 1, ( 55 digits) |
2728 |
\par 000,000,000,000,000,000,000,000,000, |
2729 |
\par 000,000,000,000,000,000,000,000,000 |
2730 |
\par ------------------------------------------------------------------------------ |
2731 |
\par ******************* Rectangular Farey Neighbor Index 2 ******************* |
2732 |
\par ------------------------------------------------------------------------------ |
2733 |
\par h(2): 99 ( 2 digits) |
2734 |
\par ------------------------------------------------------------------------------ |
2735 |
\par k(2): 311 ( 3 digits) |
2736 |
\par ------------------------------------------------------------------------------ |
2737 |
\par DAP_N(2): 318,327,974,276,527,331,189,710,610, ( 54 digits) |
2738 |
\par 932,475,884,244,372,990,353,697,749 |
2739 |
\par ------------------------------------------------------------------------------ |
2740 |
\par DAP_D(2): 1, ( 55 digits) |
2741 |
\par 000,000,000,000,000,000,000,000,000, |
2742 |
\par 000,000,000,000,000,000,000,000,000 |
2743 |
\par ------------------------------------------------------------------------------ |
2744 |
\par error_h(2): 562,421 ( 6 digits) |
2745 |
\par ------------------------------------------------------------------------------ |
2746 |
\par error_k(2): 31,100,000,000 ( 11 digits) |
2747 |
\par ------------------------------------------------------------------------------ |
2748 |
\par ERROR_DAP_N(2): 18,084,276,527,331,189,710,610, ( 50 digits) |
2749 |
\par 932,475,884,244,372,990,353,697,749 |
2750 |
\par ------------------------------------------------------------------------------ |
2751 |
\par ERROR_DAP_D(2): 1, ( 55 digits) |
2752 |
\par 000,000,000,000,000,000,000,000,000, |
2753 |
\par 000,000,000,000,000,000,000,000,000 |
2754 |
\par ------------------------------------------------------------------------------ |
2755 |
\par RAP execution ends. |
2756 |
\par ------------------------------------------------------------------------------} |
2757 |
\par \page |
2758 |
\par {\*\bkmkstart _Toc498721715}{\pntext\pard\plain\b\i\f5 4.19\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Upper Bound On Distance Between Members Of F{\sub A,B} In An Interval [FABDMAX] |
2759 |
{\*\bkmkend _Toc498721715} |
2760 |
\par \pard\plain \widctlpar \f4\fs20 |
2761 |
\par {\*\bkmkstart _Toc498721716}{\pntext\pard\plain\f5 4.19.1\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Command Line Invocation Forms{\*\bkmkend _Toc498721716} |
2762 |
\par \pard\plain \widctlpar \f4\fs20 {\b rap fab LL UL HMAX KMAX |
2763 |
\par }\pard \li720\widctlpar Calculates an upper bound on the maximum distance between terms of F{\sub KMAX,HMAX} in the interval [LL,UL] using the techniques developed in the TOMS paper. LL and UL must be non-negative, and must both be in F{\sub KMAX,HMAX} |
2764 |
. HMAX and KMAX must both be positive. |
2765 |
\par |
2766 |
\par {\*\bkmkstart _Toc498721717}{\pntext\pard\plain\f5 4.19.2\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Detailed Algorithm Description{\*\bkmkend _Toc498721717} |
2767 |
\par \pard\plain \widctlpar \f4\fs20 The TOMS paper develops several ways of bounding the maximum distance between terms in F{\sub KMAX,HMAX} |
2768 |
, and which is applicable depends on whether HMAX is the dominant constraint, or KMAX is the dominant constraint. The RAP program output clearly explains how it calculates an upper bound on the distance between terms in F{\sub KMAX,HMAX}. |
2769 |
\par |
2770 |
\par {\*\bkmkstart _Toc498721718}{\pntext\pard\plain\f5 4.19.3\tab}\pard\plain \s3\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl3\pndec\pnprev1\pnstart1\pnsp144 {\pntxtb .}}\f5 Example Invocation{\*\bkmkend _Toc498721718} |
2771 |
\par \pard\plain \widctlpar \f4\fs20 The example invocation below demonstrates error bounds over the interval [0.385, 2.160] with h{\sub MAX} {{\field{\*\fldinst SYMBOL 163 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} 193 and k{\sub MAX} {{\field{\*\fldinst SYMBOL |
2772 |
163 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} 500. This is the same example used in the TOMS paper. Explanatory remarks are included in a different font and with shading. |
2773 |
\par |
2774 |
\par {\f11\fs16 c:\\>rap fabdmax 0.385 2.160 193 500 |
2775 |
\par ------------------------------------------------------------------------------ |
2776 |
\par RAP ($Revision: 1.1 $ $Date: 2001/09/25 21:44:55 $) execution begins. |
2777 |
\par ------------------------------------------------------------------------------ |
2778 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 The section below just echoes the command-line or batch inputs. |
2779 |
\par \pard \widctlpar {\f11\fs16 ****************************************************************************** |
2780 |
\par ****************************************************************************** |
2781 |
\par **************************** Input Parameters **************************** |
2782 |
\par ****************************************************************************** |
2783 |
\par ****************************************************************************** |
2784 |
\par ------------------------------------------------------------------------------ |
2785 |
\par l_h: 77 ( 2 digits) |
2786 |
\par ------------------------------------------------------------------------------ |
2787 |
\par l_k: 200 ( 3 digits) |
2788 |
\par ------------------------------------------------------------------------------ |
2789 |
\par r_h: 54 ( 2 digits) |
2790 |
\par ------------------------------------------------------------------------------ |
2791 |
\par r_k: 25 ( 2 digits) |
2792 |
\par ------------------------------------------------------------------------------ |
2793 |
\par h_max: 193 ( 3 digits) |
2794 |
\par ------------------------------------------------------------------------------ |
2795 |
\par k_max: 500 ( 3 digits) |
2796 |
\par ------------------------------------------------------------------------------ |
2797 |
\par dap_D: 1, ( 109 digits) |
2798 |
\par 000,000,000,000,000,000,000,000,000, |
2799 |
\par 000,000,000,000,000,000,000,000,000, |
2800 |
\par 000,000,000,000,000,000,000,000,000, |
2801 |
\par 000,000,000,000,000,000,000,000,000 |
2802 |
\par ------------------------------------------------------------------------------ |
2803 |
\par ****************************************************************************** |
2804 |
\par ****************************************************************************** |
2805 |
\par ************************* Case Selection Results ************************* |
2806 |
\par ****************************************************************************** |
2807 |
\par ****************************************************************************** |
2808 |
\par ------------------------------------------------------------------------------ |
2809 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 |
2810 |
The program decides which cases should be evaluated to give an error bound. Even though the highest-numbered case will always give the larger bounds, unnecessary cases which apply are evaluated in case the user is interested in different upper bounds ove |
2811 |
r different portions of the interval. |
2812 |
\par \pard \widctlpar {\f11\fs16 Case I applies and will be evaluated. |
2813 |
\par Case II applies and will be evaluated. |
2814 |
\par Case III applies and will be evaluated. |
2815 |
\par ------------------------------------------------------------------------------ |
2816 |
\par ****************************************************************************** |
2817 |
\par ****************************************************************************** |
2818 |
\par ************************ Start Of Case I Results ************************ |
2819 |
\par ****************************************************************************** |
2820 |
\par ****************************************************************************** |
2821 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 These are the Case I results. Note that the right endpoint of the interval is truncated at HMAX/KMAX. |
2822 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2823 |
\par ***************** Possibly Truncated Interval For Case I ***************** |
2824 |
\par ------------------------------------------------------------------------------ |
2825 |
\par l_h: 77 ( 2 digits) |
2826 |
\par ------------------------------------------------------------------------------ |
2827 |
\par l_k: 200 ( 3 digits) |
2828 |
\par ------------------------------------------------------------------------------ |
2829 |
\par r_h: 193 ( 3 digits) |
2830 |
\par ------------------------------------------------------------------------------ |
2831 |
\par r_k: 500 ( 3 digits) |
2832 |
\par ------------------------------------------------------------------------------ |
2833 |
\par midpoint_h: 771 ( 3 digits) |
2834 |
\par ------------------------------------------------------------------------------ |
2835 |
\par midpoint_k: 2,000 ( 4 digits) |
2836 |
\par ------------------------------------------------------------------------------ |
2837 |
\par ***************** CF Representation Of Interval Midpoint ***************** |
2838 |
\par ************************ Inputs To CF Calculation ************************ |
2839 |
\par ------------------------------------------------------------------------------ |
2840 |
\par h_in: 771 ( 3 digits) |
2841 |
\par ------------------------------------------------------------------------------ |
2842 |
\par k_in: 2,000 ( 4 digits) |
2843 |
\par ------------------------------------------------------------------------------ |
2844 |
\par ************************** CF Partial Quotients ************************** |
2845 |
\par ------------------------------------------------------------------------------ |
2846 |
\par a(0): 0 ( 1 digit) |
2847 |
\par ------------------------------------------------------------------------------ |
2848 |
\par a(1): 2 ( 1 digit) |
2849 |
\par ------------------------------------------------------------------------------ |
2850 |
\par a(2): 1 ( 1 digit) |
2851 |
\par ------------------------------------------------------------------------------ |
2852 |
\par a(3): 1 ( 1 digit) |
2853 |
\par ------------------------------------------------------------------------------ |
2854 |
\par a(4): 2 ( 1 digit) |
2855 |
\par ------------------------------------------------------------------------------ |
2856 |
\par a(5): 6 ( 1 digit) |
2857 |
\par ------------------------------------------------------------------------------ |
2858 |
\par a(6): 3 ( 1 digit) |
2859 |
\par ------------------------------------------------------------------------------ |
2860 |
\par a(7): 3 ( 1 digit) |
2861 |
\par ------------------------------------------------------------------------------ |
2862 |
\par a(8): 2 ( 1 digit) |
2863 |
\par ------------------------------------------------------------------------------ |
2864 |
\par ***************************** CF Convergents ***************************** |
2865 |
\par ------------------------------------------------------------------------------ |
2866 |
\par p(0): 0 ( 1 digit) |
2867 |
\par q(0): 1 ( 1 digit) |
2868 |
\par ------------------------------------------------------------------------------ |
2869 |
\par p(1): 1 ( 1 digit) |
2870 |
\par q(1): 2 ( 1 digit) |
2871 |
\par ------------------------------------------------------------------------------ |
2872 |
\par p(2): 1 ( 1 digit) |
2873 |
\par q(2): 3 ( 1 digit) |
2874 |
\par ------------------------------------------------------------------------------ |
2875 |
\par p(3): 2 ( 1 digit) |
2876 |
\par q(3): 5 ( 1 digit) |
2877 |
\par ------------------------------------------------------------------------------ |
2878 |
\par p(4): 5 ( 1 digit) |
2879 |
\par q(4): 13 ( 2 digits) |
2880 |
\par ------------------------------------------------------------------------------ |
2881 |
\par p(5): 32 ( 2 digits) |
2882 |
\par q(5): 83 ( 2 digits) |
2883 |
\par ------------------------------------------------------------------------------ |
2884 |
\par p(6): 101 ( 3 digits) |
2885 |
\par q(6): 262 ( 3 digits) |
2886 |
\par ------------------------------------------------------------------------------ |
2887 |
\par p(7): 335 ( 3 digits) |
2888 |
\par q(7): 869 ( 3 digits) |
2889 |
\par ------------------------------------------------------------------------------ |
2890 |
\par p(8): 771 ( 3 digits) |
2891 |
\par q(8): 2,000 ( 4 digits) |
2892 |
\par ------------------------------------------------------------------------------ |
2893 |
\par ******** A Rational Number With Smallest Denominator In Interval ******** |
2894 |
\par ------------------------------------------------------------------------------ |
2895 |
\par result_h: 22 ( 2 digits) |
2896 |
\par ------------------------------------------------------------------------------ |
2897 |
\par result_k: 57 ( 2 digits) |
2898 |
\par ------------------------------------------------------------------------------ |
2899 |
\par ***** Upper Bound On Distance Between Farey Terms As Rational Number ***** |
2900 |
\par ------------------------------------------------------------------------------ |
2901 |
\par error_ub_h: 1 ( 1 digit) |
2902 |
\par ------------------------------------------------------------------------------ |
2903 |
\par error_up_k: 25,251 ( 5 digits) |
2904 |
\par ------------------------------------------------------------------------------ |
2905 |
\par ** Upper Bound On Distance Between Farey Terms As Decimal Approximation ** |
2906 |
\par ------------------------------------------------------------------------------ |
2907 |
\par dap_h: 39,602,391,984,475,862,342,085, ( 104 digits) |
2908 |
\par 461,961,902,498,910,934,220,426,913, |
2909 |
\par 785,592,649,796,047,681,279,949,308, |
2910 |
\par 938,259,870,896,202,130,608,688,764 |
2911 |
\par ------------------------------------------------------------------------------ |
2912 |
\par dap_k: 1, ( 109 digits) |
2913 |
\par 000,000,000,000,000,000,000,000,000, |
2914 |
\par 000,000,000,000,000,000,000,000,000, |
2915 |
\par 000,000,000,000,000,000,000,000,000, |
2916 |
\par 000,000,000,000,000,000,000,000,000 |
2917 |
\par ------------------------------------------------------------------------------ |
2918 |
\par ****************************************************************************** |
2919 |
\par ****************************************************************************** |
2920 |
\par ************************ Start Of Case II Results ************************ |
2921 |
\par ****************************************************************************** |
2922 |
\par ****************************************************************************** |
2923 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 These are the Case II results. |
2924 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2925 |
\par ************************** Case II Right Limit ************************** |
2926 |
\par ------------------------------------------------------------------------------ |
2927 |
\par case_2_right_h: 1 ( 1 digit) |
2928 |
\par ------------------------------------------------------------------------------ |
2929 |
\par case_2_right_k: 1 ( 1 digit) |
2930 |
\par ------------------------------------------------------------------------------ |
2931 |
\par ***** Upper Bound On Distance Between Farey Terms As Rational Number ***** |
2932 |
\par ------------------------------------------------------------------------------ |
2933 |
\par error_ub_h: 1 ( 1 digit) |
2934 |
\par ------------------------------------------------------------------------------ |
2935 |
\par error_up_k: 194 ( 3 digits) |
2936 |
\par ------------------------------------------------------------------------------ |
2937 |
\par ** Upper Bound On Distance Between Farey Terms As Decimal Approximation ** |
2938 |
\par ------------------------------------------------------------------------------ |
2939 |
\par dap_h: 5,154,639,175,257,731,958,762,886, ( 106 digits) |
2940 |
\par 597,938,144,329,896,907,216,494,845, |
2941 |
\par 360,824,742,268,041,237,113,402,061, |
2942 |
\par 855,670,103,092,783,505,154,639,175 |
2943 |
\par ------------------------------------------------------------------------------ |
2944 |
\par dap_k: 1, ( 109 digits) |
2945 |
\par 000,000,000,000,000,000,000,000,000, |
2946 |
\par 000,000,000,000,000,000,000,000,000, |
2947 |
\par 000,000,000,000,000,000,000,000,000, |
2948 |
\par 000,000,000,000,000,000,000,000,000 |
2949 |
\par ------------------------------------------------------------------------------ |
2950 |
\par ****************************************************************************** |
2951 |
\par ****************************************************************************** |
2952 |
\par *********************** Start Of Case III Results *********************** |
2953 |
\par ****************************************************************************** |
2954 |
\par ****************************************************************************** |
2955 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 These are the Case III results. |
2956 |
\par \pard \widctlpar {\f11\fs16 ------------------------------------------------------------------------------ |
2957 |
\par ***** Upper Bound On Distance Between Farey Terms As Rational Number ***** |
2958 |
\par ------------------------------------------------------------------------------ |
2959 |
\par error_ub_h: 1 ( 1 digit) |
2960 |
\par ------------------------------------------------------------------------------ |
2961 |
\par error_up_k: 89 ( 2 digits) |
2962 |
\par ------------------------------------------------------------------------------ |
2963 |
\par ** Upper Bound On Distance Between Farey Terms As Decimal Approximation ** |
2964 |
\par ------------------------------------------------------------------------------ |
2965 |
\par dap_h: 11,235,955,056,179,775,280,898,876, ( 107 digits) |
2966 |
\par 404,494,382,022,471,910,112,359,550, |
2967 |
\par 561,797,752,808,988,764,044,943,820, |
2968 |
\par 224,719,101,123,595,505,617,977,528 |
2969 |
\par ------------------------------------------------------------------------------ |
2970 |
\par dap_k: 1, ( 109 digits) |
2971 |
\par 000,000,000,000,000,000,000,000,000, |
2972 |
\par 000,000,000,000,000,000,000,000,000, |
2973 |
\par 000,000,000,000,000,000,000,000,000, |
2974 |
\par 000,000,000,000,000,000,000,000,000 |
2975 |
\par ------------------------------------------------------------------------------ |
2976 |
\par ****************************************************************************** |
2977 |
\par ****************************************************************************** |
2978 |
\par ********************** Start Of Cumulative Results ********************** |
2979 |
\par ****************************************************************************** |
2980 |
\par ****************************************************************************** |
2981 |
\par ------------------------------------------------------------------------------ |
2982 |
\par }\pard \widctlpar\box\brdrs\brdrw15\brsp20 \shading500 These are the cumulative results. The largest error upper bound anywhere over the interval is supplied. |
2983 |
\par \pard \widctlpar {\f11\fs16 ****************************************************************************** |
2984 |
\par ****************************************************************************** |
2985 |
\par ************************ Largest Error (Case III) ************************ |
2986 |
\par ****************************************************************************** |
2987 |
\par ****************************************************************************** |
2988 |
\par ------------------------------------------------------------------------------ |
2989 |
\par ***** Upper Bound On Distance Between Farey Terms As Rational Number ***** |
2990 |
\par ------------------------------------------------------------------------------ |
2991 |
\par error_ub_h: 1 ( 1 digit) |
2992 |
\par ------------------------------------------------------------------------------ |
2993 |
\par error_up_k: 89 ( 2 digits) |
2994 |
\par ------------------------------------------------------------------------------ |
2995 |
\par ** Upper Bound On Distance Between Farey Terms As Decimal Approximation ** |
2996 |
\par ------------------------------------------------------------------------------ |
2997 |
\par dap_h: 11,235,955,056,179,775,280,898,876, ( 107 digits) |
2998 |
\par 404,494,382,022,471,910,112,359,550, |
2999 |
\par 561,797,752,808,988,764,044,943,820, |
3000 |
\par 224,719,101,123,595,505,617,977,528 |
3001 |
\par ------------------------------------------------------------------------------ |
3002 |
\par dap_k: 1, ( 109 digits) |
3003 |
\par 000,000,000,000,000,000,000,000,000, |
3004 |
\par 000,000,000,000,000,000,000,000,000, |
3005 |
\par 000,000,000,000,000,000,000,000,000, |
3006 |
\par 000,000,000,000,000,000,000,000,000 |
3007 |
\par ------------------------------------------------------------------------------ |
3008 |
\par RAP execution ends. |
3009 |
\par ------------------------------------------------------------------------------} |
3010 |
\par \page |
3011 |
\par {\*\bkmkstart _Toc498721719}{\pntext\pard\plain\b\f5\fs28\kerning28 5.\tab}\pard\plain \s1\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl1\pndec\pnprev1\pnstart1\pnsp144 {\pntxta .}}\b\f5\fs28\kerning28 Digits Of Useful Constants{\*\bkmkend _Toc498721719} |
3012 |
\par \pard\plain \widctlpar \f4\fs20 This section contains base-10 rational approximations of useful constants to many decimal places. These can be manually entered or pasted into files used as RAP input. |
3013 |
\par |
3014 |
\par {\*\bkmkstart _Ref497727390}{\*\bkmkstart _Toc498721720}{\pntext\pard\plain\b\i\f5 5.1\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Digits Of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" |
3015 |
\\s 12}{\fldrslt\f1\fs24}}}{\*\bkmkend _Ref497727390}{\*\bkmkend _Toc498721720} |
3016 |
\par \pard\plain \widctlpar \f4\fs20 The first 1,000 digits of {{\field{\*\fldinst SYMBOL 112 \\f "Symbol" \\s 10}{\fldrslt\f1\fs20}}} were obtained from the web site {\i http://www.ex.ac.uk/cimt/general/pi10000.htm} |
3017 |
. The numbers in bold and in brackets show how many digits have been presented up to that point. This information has not been verified for accuracy. |
3018 |
\par |
3019 |
\par \pard\plain \s29\widctlpar\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 \f11\fs20 {\fs16 \tab 3.1415926535 8979323846 2643383279 5028841971 6939937510 |
3020 |
\par \tab 5820974944 5923078164 0628620899 8628034825 3421170679 |
3021 |
\par \tab 8214808651 3282306647 0938446095 5058223172 5359408128 |
3022 |
\par \tab 4811174502 8410270193 8521105559 6446229489 5493038196 |
3023 |
\par \tab 4428810975 6659334461 2847564823 3786783165 2712019091 |
3024 |
\par \tab 4564856692 3460348610 4543266482 1339360726 0249141273\tab |
3025 |
\par \tab 7245870066 0631558817 4881520920 9628292540 9171536436\tab |
3026 |
\par \tab 7892590360 0113305305 4882046652 1384146951 9415116094\tab |
3027 |
\par \tab 3305727036 5759591953 0921861173 8193261179 3105118548\tab |
3028 |
\par \tab 0744623799 6274956735 1885752724 8912279381 8301194912\tab |
3029 |
\par \tab }{\b\fs16 [}{\b\i\fs16 500]}{\fs16 |
3030 |
\par \tab 9833673362 4406566430 8602139494 6395224737 1907021798\tab |
3031 |
\par \tab 6094370277 0539217176 2931767523 8467481846 7669405132\tab |
3032 |
\par \tab 0005681271 4526356082 7785771342 7577896091 7363717872\tab |
3033 |
\par \tab 1468440901 2249534301 4654958537 1050792279 6892589235\tab |
3034 |
\par \tab 4201995611 2129021960 8640344181 5981362977 4771309960\tab |
3035 |
\par \tab 5187072113 4999999837 2978049951 0597317328 1609631859\tab |
3036 |
\par \tab 5024459455 3469083026 4252230825 3344685035 2619311881\tab |
3037 |
\par \tab 7101000313 7838752886 5875332083 8142061717 7669147303\tab |
3038 |
\par \tab 5982534904 2875546873 1159562863 8823537875 9375195778\tab |
3039 |
\par \tab 1857780532 1712268066 1300192787 6611195909 2164201989\tab |
3040 |
\par \tab }{\b\fs16 [}{\b\i\fs16 1000]}{\fs16 |
3041 |
\par }\pard\plain \widctlpar \f4\fs20 |
3042 |
\par \page |
3043 |
\par {\*\bkmkstart _Toc498721721}{\pntext\pard\plain\b\i\f5 5.2\tab}\pard\plain \s2\sb240\sa60\keepn\widctlpar{\*\pn \pnlvl2\pndec\pnprev1\pnstart1\pnsp144 }\b\i\f5 Digits Of e{\*\bkmkend _Toc498721721} |
3044 |
\par \pard\plain \widctlpar \f4\fs20 The first 1,000 digits of {\i e} were obtained from the web site {\i http://fermi.udw.ac.za/physics/e.html}. This information has not been verified for accuracy. |
3045 |
\par |
3046 |
\par \pard\plain \s29\widctlpar\tx0\tx959\tx1918\tx2877\tx3836\tx4795\tx5754\tx6713\tx7672\tx8631 \f11\fs20 {\fs16 2.7182818284590452353602874713526624977572470936999595749669676277240766303535 |
3047 |
\par 475945713821785251664274274663919320030599218174135966290435729003342952605956 |
3048 |
\par 307381323286279434907632338298807531952510190115738341879307021540891499348841 |
3049 |
\par 675092447614606680822648001684774118537423454424371075390777449920695517027618 |
3050 |
\par 386062613313845830007520449338265602976067371132007093287091274437470472306969 |
3051 |
\par 772093101416928368190255151086574637721112523897844250569536967707854499699679 |
3052 |
\par 468644549059879316368892300987931277361782154249992295763514822082698951936680 |
3053 |
\par 331825288693984964651058209392398294887933203625094431173012381970684161403970 |
3054 |
\par 198376793206832823764648042953118023287825098194558153017567173613320698112509 |
3055 |
\par 961818815930416903515988885193458072738667385894228792284998920868058257492796 |
3056 |
\par 104841984443634632449684875602336248270419786232090021609902353043699418491463 |
3057 |
\par 140934317381436405462531520961836908887070167683964243781405927145635490613031 |
3058 |
\par 07208510383750510115747704171898610687396965521267154688957035035 |
3059 |
\par }\pard\plain \widctlpar \f4\fs20 |
3060 |
\par |
3061 |
\par } |