企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
Fractional Approximations of Pi After reading the American Scientist article, On the Teeth of Wheels, which describes the intricate interplay between pure and applied mathematics, and how clock makers independently developed mathematical methods to approximate gear ratios that were not feasibly made (such as representing gear ratios that were two primes with other gear ratios that were close in value), I decided to write a program to find fractional approximations of Pi. A couple of minutes searching google brought me to an existing fractional approximations of pi page, which attempted to find decimal approximations using an iterative approach, which turned out to be very slow. However since the code was open source, I decided to modify for my own uses. The stern-brocot method pretty much changes the O(n2) to about O(1) for the calculation of successive values. You can get several versions of the source: The original modification to use the stern-brocot method A 64 bit version Fractional Approximation Table pi = 3.14159265358979323846264338327950288419716939937510 Num. Den. = Result (Accuracy ) ------------- ----------- = -------------------------------- (--------------------------------- ) 7/ 2 = 3.50000000000000000000000000000000000000 (-0.35840734641020676153735661672049711581) [ 0] 10/ 3 = 3.33333333333333333333333333333333333333 (-0.19174067974354009487068995005383044914) [ 0] 13/ 4 = 3.25000000000000000000000000000000000000 (-0.10840734641020676153735661672049711581) [ 0] 16/ 5 = 3.20000000000000000000000000000000000000 (-0.05840734641020676153735661672049711581) [ 1] 19/ 6 = 3.16666666666666666666666666666666666666 (-0.02507401307687342820402328338716378247) [ 1] 22/ 7 = 3.14285714285714285714285714285714285714 (-0.00126448926734961868021375957763997295) [ 2] 179/ 57 = 3.14035087719298245614035087719298245614 ( 0.00124177639681078232229250608652042805) [ 2] 201/ 64 = 3.14062500000000000000000000000000000000 ( 0.00096765358979323846264338327950288419) [ 3] 223/ 71 = 3.14084507042253521126760563380281690140 ( 0.00074758316725802719503774947668598279) [ 3] 245/ 78 = 3.14102564102564102564102564102564102564 ( 0.00056701256415221282161774225386185855) [ 3] 267/ 85 = 3.14117647058823529411764705882352941176 ( 0.00041618300155794434499632445597347243) [ 3] 289/ 92 = 3.14130434782608695652173913043478260869 ( 0.00028830576370628194090425284472027550) [ 3] 311/ 99 = 3.14141414141414141414141414141414141414 ( 0.00017851217565182432122924186536147005) [ 3] 333/ 106 = 3.14150943396226415094339622641509433962 ( 0.00008321962752908751924715686440854457) [ 4] 355/ 113 = 3.14159292035398230088495575221238938053 (-0.00000026676418906242231236893288649634) [ 6] 52163/ 16604 = 3.14159238737653577451216574319441098530 ( 0.00000026621325746395047764008509189889) [ 6] 52518/ 16717 = 3.14159239097924268708500329006400669976 ( 0.00000026261055055137764009321549618443) [ 6] 52873/ 16830 = 3.14159239453357100415923945335710041592 ( 0.00000025905622223430340392992240246827) [ 6] 53228/ 16943 = 3.14159239804048869739715516732573924334 ( 0.00000025554930454106548821595376364085) [ 6] 53583/ 17056 = 3.14159240150093808630393996247654784240 ( 0.00000025208885515215870342080295504179) [ 6] 53938/ 17169 = 3.14159240491583668239268448948686586289 ( 0.00000024867395655606995889379263702130) [ 6] 54293/ 17282 = 3.14159240828607800023145469274389538247 ( 0.00000024530371523823118869053560750172) [ 6] 54648/ 17395 = 3.14159241161253233687841333716585225639 ( 0.00000024197726090158423004611365062780) [ 6] 55003/ 17508 = 3.14159241489604752113319625314142106465 ( 0.00000023869374571732944713013808181954) [ 6] 55358/ 17621 = 3.14159241813744963395948016571136711877 ( 0.00000023545234360450316321756813576542) [ 6] 55713/ 17734 = 3.14159242133754370136461035299424833652 ( 0.00000023225224953709803303028525454767) [ 6] 56068/ 17847 = 3.14159242449711436095702358939877850619 ( 0.00000022909267887750561979388072437800) [ 6] 56423/ 17960 = 3.14159242761692650334075723830734966592 ( 0.00000022597286673512188614497215321827) [ 6] 56778/ 18073 = 3.14159243069772588944834836496431140375 ( 0.00000022289206734901429501831519148044) [ 6] 57133/ 18186 = 3.14159243374023974485868250302430440998 ( 0.00000021984955349360396088025519847421) [ 6] 57488/ 18299 = 3.14159243674517733209464998087327176348 ( 0.00000021684461590636799340240623112071) [ 6] 57843/ 18412 = 3.14159243971323050184662176841190527916 ( 0.00000021387656273661602161486759760503) [ 6] 58198/ 18525 = 3.14159244264507422402159244264507422402 ( 0.00000021094471901444105094063442866017) [ 6] 58553/ 18638 = 3.14159244554136709947419250992595772078 ( 0.00000020804842613898845087335354516341) [ 6] 58908/ 18751 = 3.14159244840275185323449416031145005599 ( 0.00000020518704138522814922296805282820) [ 6] 59263/ 18864 = 3.14159245122985581000848176420695504664 ( 0.00000020235993742845416161907254783755) [ 6] 59618/ 18977 = 3.14159245402329135269009854033830426305 ( 0.00000019956650188577254484294119862114) [ 6] 59973/ 19090 = 3.14159245678365636458878994237820848611 ( 0.00000019680613687387385344090129439808) [ 6] 60328/ 19203 = 3.14159245951153465604332656355777743060 ( 0.00000019407825858241931681972172545359) [ 6] 60683/ 19316 = 3.14159246220749637606129633464485400704 ( 0.00000019138229686240134704863464887715) [ 6] 61038/ 19429 = 3.14159246487209840959390601677904163878 ( 0.00000018871769482886873736650046124541) [ 6] 61393/ 19542 = 3.14159246750588476102753044724183809231 ( 0.00000018608390847743511293603766479188) [ 6] 61748/ 19655 = 3.14159247010938692444670567285677944543 ( 0.00000018348040631401593771042272343876) [ 6] 62103/ 19768 = 3.14159247268312424119789558883043302306 ( 0.00000018090666899726474779444906986113) [ 6] 62458/ 19881 = 3.14159247522760424525929279211307278305 ( 0.00000017836218899320335059116643010114) [ 6] 62813/ 19994 = 3.14159247774332299689906972091627488246 ( 0.00000017584647024156357366236322800173) [ 6] 63168/ 20107 = 3.14159248023076540508280698264286069528 ( 0.00000017335902783337983640063664218891) [ 6] 63523/ 20220 = 3.14159248269040553907022749752720079129 ( 0.00000017089938769939241588575230209290) [ 6] 63878/ 20333 = 3.14159248512270692962179707864063345300 ( 0.00000016846708630884084630463886943119) [ 6] 64233/ 20446 = 3.14159248752812286021715739019857184779 ( 0.00000016606167037824548599308093103640) [ 6] 64588/ 20559 = 3.14159248990709664866968237754754608687 ( 0.00000016368269658979296100573195679732) [ 6] 64943/ 20672 = 3.14159249226006191950464396284829721362 ( 0.00000016132973131895799942043120567057) [ 6] 65298/ 20785 = 3.14159249458744286745248977628097185470 ( 0.00000015900235037101015360699853102949) [ 6] 65653/ 20898 = 3.14159249688965451239353048138577854340 ( 0.00000015670013872606911290189372434079) [ 6] 66008/ 21011 = 3.14159249916710294607586502308314692304 ( 0.00000015442269029238677836019635596115) [ 6] 66363/ 21124 = 3.14159250142018557091459950766900208293 ( 0.00000015216960766754804387561050080126) [ 6] 66718/ 21237 = 3.14159250364929133116730234967274097094 ( 0.00000014994050190729534103360676191325) [ 6] 67073/ 21350 = 3.14159250585480093676814988290398126463 ( 0.00000014773499230169449350037552161956) [ 6] 67428/ 21463 = 3.14159250803708708009131994595350137445 ( 0.00000014555270615837132343732600150974) [ 6] 67783/ 21576 = 3.14159251019651464590285502410085279940 ( 0.00000014339327859255978835917865008479) [ 6] 68138/ 21689 = 3.14159251233344091474941214440499792521 ( 0.00000014125635232371323123887450495898) [ 6] 68493/ 21802 = 3.14159251444821576002201632877717640583 ( 0.00000013914157747844062705450232647836) [ 6] 68848/ 21915 = 3.14159251654118183892311202372804015514 ( 0.00000013704861139953953135955146272905) [ 6] 69203/ 22028 = 3.14159251861267477755583802433266751407 ( 0.00000013497711846090680535894683537012) [ 6] 69558/ 22141 = 3.14159252066302335034551284946479382141 ( 0.00000013292676988811713053381470906278) [ 6] 69913/ 22254 = 3.14159252269254965399478745394086456367 ( 0.00000013089724358446785592933863832052) [ 6] 70268/ 22367 = 3.14159252470156927616577994366700943354 ( 0.00000012888822396229686343961249345065) [ 6] 70623/ 22480 = 3.14159252669039145907473309608540925266 ( 0.00000012689940177938791028719409363153) [ 6] 70978/ 22593 = 3.14159252865931925817731155667684681095 ( 0.00000012493047398028533182660265607324) [ 6] 71333/ 22706 = 3.14159253060864969611556416806130538183 ( 0.00000012298114354234707921521819750236) [ 6] 71688/ 22819 = 3.14159253253867391209080152504491870809 ( 0.00000012105111932637184185823458417610) [ 6] 72043/ 22932 = 3.14159253444967730682016396302110587824 ( 0.00000011914011593164247942025839700595) [ 6] 72398/ 23045 = 3.14159253634193968322846604469516164026 ( 0.00000011724785355523417733858434124393) [ 6] 72753/ 23158 = 3.14159253821573538302098626824423525347 ( 0.00000011537405785544165711503526763072) [ 6] 73108/ 23271 = 3.14159254007133341927721198057668342572 ( 0.00000011351845981918543140270281945847) [ 6] 73463/ 23384 = 3.14159254190899760520013684570646595963 ( 0.00000011168079563326250653757303692456) [ 6] 73818/ 23497 = 3.14159254372898667915052985487509043707 ( 0.00000010986080655931211352840441244712) [ 6] 74173/ 23610 = 3.14159254553155442609063955950868276154 ( 0.00000010805823881237200382377082012265) [ 6] 74528/ 23723 = 3.14159254731694979555705433545504362854 ( 0.00000010627284344290558904782445925565) [ 6] 74883/ 23836 = 3.14159254908541701627789897633831179728 ( 0.00000010450437622218474440694119108691) [ 6] 75238/ 23949 = 3.14159255083719570754520021712806380224 ( 0.00000010275259753091744316615143908195) [ 6] 75593/ 24062 = 3.14159255257252098744908985121768764026 ( 0.00000010101727225101355353206181524393) [ 6] 75948/ 24175 = 3.14159255429162357807652533609100310237 ( 0.00000009929816966038611804718849978182) [ 7] 76303/ 24288 = 3.14159255599472990777338603425559947299 ( 0.00000009759506333068925734902390341120) [ 7] 76658/ 24401 = 3.14159255768206221056514077291914265808 ( 0.00000009590773102789750261036036022611) [ 7] 77013/ 24514 = 3.14159255935383862282777188545321041037 ( 0.00000009423595461563487149782629247382) [ 7] 77368/ 24627 = 3.14159256101027327729727534819507045113 ( 0.00000009257951996116536803508443243306) [ 7] 77723/ 24740 = 3.14159256265157639450282942603071948261 ( 0.00000009093821684395981395724878340158) [ 7] 78078/ 24853 = 3.14159256427795437170562909910272401722 ( 0.00000008931183886675701428417677886697) [ 7] 78433/ 24966 = 3.14159256588960986942241448369782904750 ( 0.00000008770018336904022889958167383669) [ 7] 78788/ 25079 = 3.14159256748674189560987280194585111049 ( 0.00000008610305134285277058133365177370) [ 7] 79143/ 25192 = 3.14159256906954588758335979676087646872 ( 0.00000008452024735087928358651862641547) [ 7] 79498/ 25305 = 3.14159257063821379174076269511954159257 ( 0.00000008295157944672188068815996129162) [ 7] 79853/ 25418 = 3.14159257219293414115980801007160280116 ( 0.00000008139685909730283537320790008303) [ 7] 80208/ 25531 = 3.14159257373389213113469899338059613802 ( 0.00000007985590110732794438989890674617) [ 7] 80563/ 25644 = 3.14159257526126969271564498518171892060 ( 0.00000007832852354574699839809778396359) [ 7] 80918/ 25757 = 3.14159257677524556431261404666692549598 ( 0.00000007681454767415002933661257738821) [ 7] 81273/ 25870 = 3.14159257827599536142249710088906068805 ( 0.00000007531379787704014628239044219614) [ 7] 81628/ 25983 = 3.14159257976369164453681253127044606088 ( 0.00000007382610159392583085200905682331) [ 7] 81983/ 26096 = 3.14159258123850398528510116492949110974 ( 0.00000007235128925317754221835001177445) [ 7] 82338/ 26209 = 3.14159258270059903086725933839520775306 ( 0.00000007088919420759538404488429513113) [ 7] 82693/ 26322 = 3.14159258415014056682622900995365093837 ( 0.00000006943965267163641437332585194582) [ 7] 83048/ 26435 = 3.14159258558728957821070550406657839984 ( 0.00000006800250366025193787921292448435) [ 7] 83403/ 26548 = 3.14159258701220430917583245442217869519 ( 0.00000006657758892928681092885732418900) [ 7] 83758/ 26661 = 3.14159258842504032106822699823712538914 ( 0.00000006516475291739441638504237749505) [ 7] 84113/ 26774 = 3.14159258982595054904011354298946739374 ( 0.00000006376384268942252984029003549045) [ 7] 84468/ 26887 = 3.14159259121508535723583888124372373265 ( 0.00000006237470788122680450203577915154) [ 7] 84823/ 27000 = 3.14159259259259259259259259259259259259 ( 0.00000006099720064587005079068691029160) [ 7] 85178/ 27113 = 3.14159259395861763729576218050381735698 ( 0.00000005963117560116688120277568552721) [ 7] 85533/ 27226 = 3.14159259531330345992800999045030485565 ( 0.00000005827648977853463339282919802854) [ 7] 85888/ 27339 = 3.14159259665679066534986649109330992355 ( 0.00000005693300257311277689218619296064) [ 7] 86243/ 27452 = 3.14159259798921754334838991694594200786 ( 0.00000005560057569511425346633356087633) [ 7] 86598/ 27565 = 3.14159259931072011608924360602212951206 ( 0.00000005427907312237339977725737337213) [ 7] 86953/ 27678 = 3.14159260062143218440638774477924705542 ( 0.00000005296836105405625563850025582877) [ 7] 87308/ 27791 = 3.14159260192148537296246986434457198373 ( 0.00000005166830786550017351893493090046) [ 7] 87663/ 27904 = 3.14159260321100917431192660550458715596 ( 0.00000005037878406415071677777491572823) [ 7] 88018/ 28017 = 3.14159260449013099189777635007316986115 ( 0.00000004909966224656486703320633302304) [ 7] 88373/ 28130 = 3.14159260575897618201208674013508709562 ( 0.00000004783081705645055664314441578857) [ 7] 88728/ 28243 = 3.14159260701766809474914138016499663633 ( 0.00000004657212514371350200311450624786) [ 7] 89083/ 28356 = 3.14159260826632811397940471152489772887 ( 0.00000004532346512448323867175460515532) [ 7] 89438/ 28469 = 3.14159260950507569637149179809617478660 ( 0.00000004408471754209115158518332809759) [ 7] 89793/ 28582 = 3.14159261073402840948848925897417955356 ( 0.00000004285576482897415412430532333063) [ 7] 90148/ 28695 = 3.14159261195330196898414357902073531974 ( 0.00000004163649126947849980425876756445) [ 7] 90503/ 28808 = 3.14159261316301027492363232435434601499 ( 0.00000004042678296353901105892515686920) [ 7] 90858/ 28921 = 3.14159261436326544725286124269561910030 ( 0.00000003922652779120978214058388378389) [ 7] 91213/ 29034 = 3.14159261555417786043948474202658951574 ( 0.00000003803561537802315864125291336845) [ 7] 91568/ 29147 = 3.14159261673585617730812776615089031461 ( 0.00000003685393706115451561712861256958) [ 7] 91923/ 29260 = 3.14159261790840738209159261790840738209 ( 0.00000003568138585637105076537109550210) [ 7] 92278/ 29373 = 3.14159261907193681271916385796479760324 ( 0.00000003451785642574347952531470528095) [ 7] 92633/ 29486 = 3.14159262022654819236247710777996337244 ( 0.00000003336324504610016627549953951175) [ 7] 92988/ 29599 = 3.14159262137234366025879252677455319436 ( 0.00000003221744957820385085650494968983) [ 7] 93343/ 29712 = 3.14159262250942380183091007000538502961 ( 0.00000003108036943663173331327411785458) [ 7] 93698/ 29825 = 3.14159262363788767812238055322715842414 ( 0.00000002995190556034026283005234446005) [ 7] 94053/ 29938 = 3.14159262475783285456610328011223194602 ( 0.00000002883196038389654010316727093817) [ 7] 94408/ 30051 = 3.14159262586935542910385677681275165551 ( 0.00000002772043780935878660646675122868) [ 7] 94763/ 30164 = 3.14159262697255005967378331786235247314 ( 0.00000002661724317878886006541715041105) [ 7] 95118/ 30277 = 3.14159262806750999108233972982792218515 ( 0.00000002552228324738030365345158069904) [ 7] 95473/ 30390 = 3.14159262915432708127673576834485027969 ( 0.00000002443546615718590761493465260450) [ 7] 95828/ 30503 = 3.14159263023309182703340655017539258433 ( 0.00000002335670141142923683310411029986) [ 7] 96183/ 30616 = 3.14159263130389338907760648027175333159 ( 0.00000002228589984938503690300774955260) [ 7] 96538/ 30729 = 3.14159263236681961664876826450584138761 ( 0.00000002122297362181387511877366149658) [ 7] 96893/ 30842 = 3.14159263342195707152584138512418131119 ( 0.00000002016783616693680199815532157300) [ 7] 97248/ 30955 = 3.14159263446939105152640930382813761912 ( 0.00000001912040218693623407945136526507) [ 7] 97603/ 31068 = 3.14159263550920561349298313377108278614 ( 0.00000001808058762496966024950842009805) [ 7] 97958/ 31181 = 3.14159263654148359577948109425611750745 ( 0.00000001704830964268316228902338537674) [ 7] 98313/ 31294 = 3.14159263756630664025052725762126925289 ( 0.00000001602348659821211612565823363130) [ 7] 98668/ 31407 = 3.14159263858375521380583946254019804502 ( 0.00000001500603802465680392073930483917) [ 7] 99023/ 31520 = 3.14159263959390862944162436548223350253 ( 0.00000001399588460902101901779726938166) [ 7] 99378/ 31633 = 3.14159264059684506686055701324566117661 ( 0.00000001299294817160208637003384170758) [ 7] 99733/ 31746 = 3.14159264159264159264159264159264159264 ( 0.00000001199715164582105074168686129155) [ 7] 100088/ 31859 = 3.14159264258137417998053925107504943657 ( 0.00000001100841905848210413220445344762) [ 7] 100443/ 31972 = 3.14159264356311772801201050919554610283 ( 0.00000001002667551045063287408395678136) [ 7] 100798/ 32085 = 3.14159264453794608072307932055477637525 ( 0.00000000905184715773956406272472650894) [ 8] 101153/ 32198 = 3.14159264550593204546866264985402820050 ( 0.00000000808386119299398073342547468369) [ 8] 101508/ 32311 = 3.14159264646714741109838754603695335953 ( 0.00000000712264582736425583724254952466) [ 8] 101863/ 32424 = 3.14159264742166296570441648161855415741 ( 0.00000000616813027275822690166094872678) [ 8] 102218/ 32537 = 3.14159264836954851399944678366167747487 ( 0.00000000522024472446319659961782540932) [ 8] 102573/ 32650 = 3.14159264931087289433384379785604900459 ( 0.00000000427892034412879958542345387960) [ 8] 102928/ 32763 = 3.14159265024570399536062021182431401275 ( 0.00000000334408924310202317145518887144) [ 8] 103283/ 32876 = 3.14159265117410877235673439591191142474 ( 0.00000000241568446610590898736759145945) [ 8] 103638/ 32989 = 3.14159265209615326320894843735790718118 ( 0.00000000149363997525369494592159570301) [ 8] 103993/ 33102 = 3.14159265301190260407226149477372968400 ( 0.00000000057789063439038188850577320019) [ 9] 104348/ 33215 = 3.14159265392142104470871594159265392142 (-0.00000000033162780624607255831315103723) [ 9] 208341/ 66317 = 3.14159265346743670552045478534915632492 ( 0.00000000012235653294218859793034655927) [ 9] 312689/ 99532 = 3.14159265361893662339750030141060161556 (-0.00000000002914338493485691813109873137) [10] 833719/ 265381 = 3.14159265358107777120441930658185778183 ( 0.00000000000871546725822407669764510236) [11] 1146408/ 364913 = 3.14159265359140397848254241421927966391 (-0.00000000000161074001989903093977677972) [11] 3126535/ 995207 = 3.14159265358865040137378454934501063597 ( 0.00000000000114283708885883393449224822) [11] 4272943/ 1360120 = 3.14159265358938917154368732170690821398 ( 0.00000000000040406691895606157259467021) [12] 5419351/ 1725033 = 3.14159265358981538324194377730744861112 (-0.00000000000002214477930039402794572693) [13] 42208400/ 13435351 = 3.14159265358977223594679439338801048070 ( 0.00000000000002100251584898989149240349) [13] 47627751/ 15160384 = 3.14159265358977714548655231951908342163 ( 0.00000000000001609297609106376041946256) [13] 53047102/ 16885417 = 3.14159265358978105189821489158366654492 ( 0.00000000000001218656442849169583633927) [13] 58466453/ 18610450 = 3.14159265358978423412652568852445803298 ( 0.00000000000000900433611769475504485121) [14] 63885804/ 20335483 = 3.14159265358978687646612573696921779531 ( 0.00000000000000636199651764631028508888) [14] 69305155/ 22060516 = 3.14159265358978910556761228975786423128 ( 0.00000000000000413289503109352163865291) [14] 74724506/ 23785549 = 3.14159265358979101134054126730478241221 ( 0.00000000000000222712210211597472047198) [14] 80143857/ 25510582 = 3.14159265358979265937562694571217544154 ( 0.00000000000000057908701643756732744265) [15] 165707065/ 52746197 = 3.14159265358979340254615892023457160333 (-0.00000000000000016408351553695506871914) [15] 245850922/ 78256779 = 3.14159265358979316028327718420406748404 ( 0.00000000000000007817936619907543540015) [16] 411557987/ 131002976 = 3.14159265358979325782644815641440084536 (-0.00000000000000001936380477313489796117) [16] 657408909/ 209259755 = 3.14159265358979322134827119529027452029 ( 0.00000000000000001711437218798922836390) [16] 1068966896/ 340262731 = 3.14159265358979323539256492948091926059 ( 0.00000000000000000307007845379858362360) [17] 2549491779/ 811528438 = 3.14159265358979323901400975919959073572 (-0.00000000000000000055136637592008785153) [18] 3618458675/ 1151791169 = 3.14159265358979323794416069185889026381 ( 0.00000000000000000051848269142061262038) [18] 6167950454/ 1963319607 = 3.14159265358979323838637750639037956696 ( 0.00000000000000000007626587688912331723) [19] 14885392687/ 4738167652 = 3.14159265358979323849387505801156062596 (-0.00000000000000000003123167473205774177) [19] 21053343141/ 6701487259 = 3.14159265358979323846238174277486901359 ( 0.00000000000000000000026164050463387060) [21] 899125804609/ 286200632530 = 3.14159265358979323846290312739302875642 (-0.00000000000000000000025974411352587223) [21] 920179147750/ 292902119789 = 3.14159265358979323846289119831454290206 (-0.00000000000000000000024781503504001787) [21] 941232490891/ 299603607048 = 3.14159265358979323846287980289163130623 (-0.00000000000000000000023641961212842204) [21] 962285834032/ 306305094307 = 3.14159265358979323846286890609758924162 (-0.00000000000000000000022552281808635743) [21] 983339177173/ 313006581566 = 3.14159265358979323846285847590540629124 (-0.00000000000000000000021509262590340705) [21] 1004392520314/ 319708068825 = 3.14159265358979323846284848297337933163 (-0.00000000000000000000020509969387644744) [21] 1025445863455/ 326409556084 = 3.14159265358979323846283890036945343710 (-0.00000000000000000000019551708995055291) [21] 1046499206596/ 333111043343 = 3.14159265358979323846282970332883684002 (-0.00000000000000000000018632004933395583) [21] 1067552549737/ 339812530602 = 3.14159265358979323846282086904029653302 (-0.00000000000000000000017748576079364883) [21] 1088605892878/ 346514017861 = 3.14159265358979323846281237645725178231 (-0.00000000000000000000016899317774889812) [21] 1109659236019/ 353215505120 = 3.14159265358979323846280420613037215131 (-0.00000000000000000000016082285086926712) [21] 1130712579160/ 359916992379 = 3.14159265358979323846279634005887720665 (-0.00000000000000000000015295677937432246) [21] 1151765922301/ 366618479638 = 3.14159265358979323846278876155814494589 (-0.00000000000000000000014537827864206170) [21] 1172819265442/ 373319966897 = 3.14159265358979323846278145514157963557 (-0.00000000000000000000013807186207675138) [21] 1193872608583/ 380021454156 = 3.14159265358979323846277440641497885695 (-0.00000000000000000000013102313547597276) [21] 1214925951724/ 386722941415 = 3.14159265358979323846276760198188357586 (-0.00000000000000000000012421870238069167) [21] 1235979294865/ 393424428674 = 3.14159265358979323846276102935860166316 (-0.00000000000000000000011764607909877897) [21] 1257032638006/ 400125915933 = 3.14159265358979323846275467689777075912 (-0.00000000000000000000011129361826787493) [21] 1278085981147/ 406827403192 = 3.14159265358979323846274853371947582775 (-0.00000000000000000000010515043997294356) [21] 1299139324288/ 413528890451 = 3.14159265358979323846274258964906440289 (-0.00000000000000000000009920636956151870) [22] 1320192667429/ 420230377710 = 3.14159265358979323846273683516091186105 (-0.00000000000000000000009345188140897686) [22] 1341246010570/ 426931864969 = 3.14159265358979323846273126132748294414 (-0.00000000000000000000008787804798005995) [22] 1362299353711/ 433633352228 = 3.14159265358979323846272585977311658438 (-0.00000000000000000000008247649361370019) [22] 1383352696852/ 440334839487 = 3.14159265358979323846272062263203084137 (-0.00000000000000000000007723935252795718) [22] 1404406039993/ 447036326746 = 3.14159265358979323846271554251010510785 (-0.00000000000000000000007215923060222366) [22] 1425459383134/ 453737814005 = 3.14159265358979323846271061245004906498 (-0.00000000000000000000006722917054618079) [22] 1446512726275/ 460439301264 = 3.14159265358979323846270582589961333896 (-0.00000000000000000000006244262011045477) [22] 1467566069416/ 467140788523 = 3.14159265358979323846270117668253641040 (-0.00000000000000000000005779340303352621) [22] 1488619412557/ 473842275782 = 3.14159265358979323846269665897195688730 (-0.00000000000000000000005327569245400311) [22] 1509672755698/ 480543763041 = 3.14159265358979323846269226726605047424 (-0.00000000000000000000004888398654759005) [22] 1530726098839/ 487245250300 = 3.14159265358979323846268799636567745111 (-0.00000000000000000000004461308617456692) [22] 1551779441980/ 493946737559 = 3.14159265358979323846268384135384972222 (-0.00000000000000000000004045807434683803) [22] 1572832785121/ 500648224818 = 3.14159265358979323846267979757684694309 (-0.00000000000000000000003641429734405890) [22] 1593886128262/ 507349712077 = 3.14159265358979323846267586062682924856 (-0.00000000000000000000003247734732636437) [22] 1614939471403/ 514051199336 = 3.14159265358979323846267202632581000779 (-0.00000000000000000000002864304630712360) [22] 1635992814544/ 520752686595 = 3.14159265358979323846266829071086609244 (-0.00000000000000000000002490743136320825) [22] 1657046157685/ 527454173854 = 3.14159265358979323846266465002047559662 (-0.00000000000000000000002126674097271243) [22] 1678099500826/ 534155661113 = 3.14159265358979323846266110068188399415 (-0.00000000000000000000001771740238110996) [22] 1699152843967/ 540857148372 = 3.14159265358979323846265763929940953314 (-0.00000000000000000000001425601990664895) [22] 1720206187108/ 547558635631 = 3.14159265358979323846265426264360740155 (-0.00000000000000000000001087936410451736) [22] 1741259530249/ 554260122890 = 3.14159265358979323846265096764121998082 (-0.00000000000000000000000758436171709663) [23] 1762312873390/ 560961610149 = 3.14159265358979323846264775136584745085 (-0.00000000000000000000000436808634456666) [23] 1783366216531/ 567663097408 = 3.14159265358979323846264461102927921823 (-0.00000000000000000000000122774977633404) [23] 3587785776203/ 1142027682075 = 3.14159265358979323846264306850252143875 ( 0.00000000000000000000000031477698144544) [24] 5371151992734/ 1709690779483 = 3.14159265358979323846264358066268961876 (-0.00000000000000000000000019738318673457) [24] 8958937768937/ 2851718461558 = 3.14159265358979323846264337555790890412 ( 0.00000000000000000000000000772159398007) [26] 77042654144230/ 24523438471947 = 3.14159265358979323846264338985711710108 (-0.00000000000000000000000000657761421689) [26] 86001591913167/ 27375156933505 = 3.14159265358979323846264338836754332073 (-0.00000000000000000000000000508804043654) [26] 94960529682104/ 30226875395063 = 3.14159265358979323846264338715903365924 (-0.00000000000000000000000000387953077505) [26] 103919467451041/ 33078593856621 = 3.14159265358979323846264338615889617509 (-0.00000000000000000000000000287939329090) [26] 112878405219978/ 35930312318179 = 3.14159265358979323846264338531751659443 (-0.00000000000000000000000000203801371024) [26] 121837342988915/ 38782030779737 = 3.14159265358979323846264338459987358119 (-0.00000000000000000000000000132037069700) [26] 130796280757852/ 41633749241295 = 3.14159265358979323846264338398054099481 (-0.00000000000000000000000000070103811062) [27] 139755218526789/ 44485467702853 = 3.14159265358979323846264338344061241435 (-0.00000000000000000000000000016110953016) [27] 288469374822515/ 91822653867264 = 3.14159265358979323846264338319580081089 ( 0.00000000000000000000000000008370207330) [28] 428224593349304/ 136308121570117 = 3.14159265358979323846264338327569743446 ( 0.00000000000000000000000000000380544973) [29] 3137327371971917/ 998642318693672 = 3.14159265358979323846264338328304372840 (-0.00000000000000000000000000000354084421) [29] 3565551965321221/ 1134950440263789 = 3.14159265358979323846264338328216143479 (-0.00000000000000000000000000000265855060) [29] 3993776558670525/ 1271258561833906 = 3.14159265358979323846264338328146834546 (-0.00000000000000000000000000000196546127) [29] 4422001152019829/ 1407566683404023 = 3.14159265358979323846264338328090949305 (-0.00000000000000000000000000000140660886) [29] 4850225745369133/ 1543874804974140 = 3.14159265358979323846264338328044932237 (-0.00000000000000000000000000000094643818) [30] 5278450338718437/ 1680182926544257 = 3.14159265358979323846264338328006381618 (-0.00000000000000000000000000000056093199) [30] 5706674932067741/ 1816491048114374 = 3.14159265358979323846264338327973616618 (-0.00000000000000000000000000000023328199) [30] 6134899525417045/ 1952799169684491 = 3.14159265358979323846264338327945425704 ( 0.00000000000000000000000000000004862715) [31] 17976473982901831/ 5722089387483356 = 3.14159265358979323846264338327954374978 (-0.00000000000000000000000000000004086559) [31] 24111373508318876/ 7674888557167847 = 3.14159265358979323846264338327952097924 (-0.00000000000000000000000000000001809505) [31] 30246273033735921/ 9627687726852338 = 3.14159265358979323846264338327950744587 (-0.00000000000000000000000000000000456168) [32] 36381172559152966/ 11580486896536829 = 3.14159265358979323846264338327949847672 ( 0.00000000000000000000000000000000440747) [32] 66627445592888887/ 21208174623389167 = 3.14159265358979323846264338327950254837 ( 0.00000000000000000000000000000000033582) [33] 230128609812402582/ 73252211597019839 = 3.14159265358979323846264338327950319206 (-0.00000000000000000000000000000000030787) [33] 296756055405291469/ 94460386220409006 = 3.14159265358979323846264338327950304754 (-0.00000000000000000000000000000000016335) [33] 363383500998180356/ 115668560843798173 = 3.14159265358979323846264338327950295601 (-0.00000000000000000000000000000000007182) [34] 430010946591069243/ 136876735467187340 = 3.14159265358979323846264338327950289285 (-0.00000000000000000000000000000000000866) [35] 1356660285366096616/ 431838381024951187 = 3.14159265358979323846264338327950287593 ( 0.00000000000000000000000000000000000826) [35] 1786671231957165859/ 568715116492138527 = 3.14159265358979323846264338327950288000 ( 0.00000000000000000000000000000000000419) [35] 2216682178548235102/ 705591851959325867 = 3.14159265358979323846264338327950288250 ( 0.00000000000000000000000000000000000169) [35] 2646693125139304345/ 842468587426513207 = 3.14159265358979323846264338327950288418 ( 0.00000000000000000000000000000000000001) [37] http://qin.laya.com/tech_projects_approxpi.html?tdsourcetag=s_pcqq_aiomsg `下面是R语言(验证)代码` ``` options(digits=30) PI <- 3.14159265358979323846264338327950288419716939937510 p1fZ1 <- (2216682178548235102 -1) p1fM1 <- 705591851959325867 -1 p2fZ2 <- (2646693125139304345 +1) p2fM2 <- 842468587426513207 +1 zuijin=3 zuixiao <-1.0 zuijin_fZ <- (2216682178548235102 -10) zuijin_fM <- 842468587426513207 +10 for(d1fz in seq( p2fZ2-10, p2fZ2+10, 0.1) ) { #1,100,10) ) { #p1fZ1,p2fZ2, 10) ) {#for110 for(d2fm in seq( p2fM2-10, p2fM2+10,0.1) ) { #1,100,10) ) { ##p1fM1, p2fM2,1) ) {#for210 temP<- d1fz/d2fm if(zuixiao> abs(temP-PI) ) { zuijin=temP zuixiao=abs(temP-PI) zuijin_fZ=d1fz zuijin_fM=d2fm print( d2fm) } }#for210 }#for110 print("zuijin_fZ:") print(zuijin_fZ) print("FenMu:") print(zuijin_fM) 上面代码结果: print("zuijin_fZ:") [1] "zuijin_fZ:" > print(zuijin_fZ) [1] 2646693125139304448 > print("FenMu:") [1] "FenMu:" > print(zuijin_fM) [1] 842468587426513152 ```