Post Reply 
Mini-challenge - accurate factorials
07-12-2023, 09:23 PM (This post was last modified: 07-12-2023 09:53 PM by Gilles.)
Post: #14
RE: Mini-challenge - accurate factorials
Brut force search in NewRPL :

Fact0:
Code:
 « → p
  « 800 1 FOR 'n'
      2000 SETPREC n !
      DUP XPON 1 + ALOG 
      IF DUP2 / p SETPREC UNROT / == THEN
        2000 SETPREC n n ! 2 →LIST EXIT
      END
    -1 STEP
  »
 »

Nota about NewRPL:
- SETPREC : set the number of significant digits. The default is 32 digits of precision. The maximum is 2000 digits of precision (for comparaison, the stock 50g ROM has a fixed precision of 12 digits displayed, 15 digits internally)
- EXIT : Exit the current loop

Code:
 8 Fact0 -> { 13 6227020800 }
10 Fact0 -> { 15 1307674368000 }
12 Fact0 -> { 17 355687428096000 }
14 Fact0 -> { 18 6402373705728000 }
32 Fact0 -> { 34 295232799039604140847618609643520000000 }
64 Fact0 -> { 57 405269195048772167556806019054323221349803847962266021451844812800000000000​00 }
128 Fact0 -> { 96 991677934870949689209571401541893801158183648651267795444376054838492222809​091499987689476037000748982075094738965754305639874560000000000000000000000
}
256 Fact0 -> { 165 542391066613158877498449501421284184382157203794136983425672691311657301726​04765680403290849565015553604650354393935095487058155225915554489271207416431263​90781922570357408851928637648701404640994397662139185673022050034907694293331407​7895545443758280540160000000000000000000000000000000000000000
}
512 Fact0 -> { 286 870689172796271554439702119838710809861359436384882148385757313579329580990​40337765606647296919822085262226784396179645422058535285013494774076543181031928​21521975674207518165853340117627024513062774476157616015873220009335948079806785​94020502008659592570378865714219286067426896030852695623349485776172755222069040​92744787035270291650252110759960256346897987385736293274187417570994046062830362​96662425273776049359170782217763779902901820404689866285801647374451120503197165​64288841092540076553621682557812736000000000000000000000000000000000000000000000​0000000000000000000000000
}
1024 Fact0 -> { 505 392861868403666344606434511328949851159761646778169500967877826152340954987​49694266874140124572723925272264103605631433461353773166349016542057566907963786​79369789249678066704827473997936383766298678185353503511636963690997288463459315​28349258044609104905102916225942689582472014503580935442476249977961703368048074​25452485517882532734515489150091355990925022044091523930368535184941914015837544​76432018854163989906304863360776309166418653769241591724992916135519350759876754​98801135317120524095642761462529462342291827527249923279305068492040834131194681​27534608220959477583691774158634323794314270352760496796509530793277138704284826​10530819410914572674844721261068071609184677061435087917832837620234857996721204​74765964351091187746565958503161362537259409187576449045156060884458132656558714​49737037124601474017541148483331297537869946687627144931121011685292261820754558​60292246216102026181045566962485992305361055397280927264396098934493316949836471​39866362012104395551155850035104037632095520211956841549686969991168000000000000​00000000000000000000000000000000000000000000000000000000000000000000000000000000​000000000000000000000000000000000
}
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mini-challenge - accurate factorials - Gilles - 07-12-2023 09:23 PM



User(s) browsing this thread: 1 Guest(s)