mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
initial commit
This commit is contained in:
commit
c2da007f40
1610 changed files with 398047 additions and 0 deletions
18
crypto/test/fift/contfrac.fif
Normal file
18
crypto/test/fift/contfrac.fif
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ dup 2over rot } : 3dup
|
||||
{ 2drop drop } : 3drop
|
||||
{ { 5 roll } 3 times } : 3swap
|
||||
{ -rot over + rot over + -rot over + rot } : step1
|
||||
{ negate -rot negate swap negate } : step2
|
||||
{ 0 3 -roll { 3dup step1 dup 0> } { 3swap 3drop 3 roll 1+ 3 -roll } while 3drop step2 } : nsteps1
|
||||
{ ' nsteps1 swap times 3drop } : qcontfrac
|
||||
{ -1 0 2swap qcontfrac } : sqrtcontfrac
|
||||
{ rot 2 pick * + swap } : revstep1
|
||||
{ 1 0 rot ' revstep1 swap times } : computecontfrac
|
||||
1 { 10 * } 74 times constant One
|
||||
{ 100 sqrtcontfrac 100 computecontfrac */r } : *sqrtint
|
||||
{ One swap *sqrtint } : sqrtint
|
||||
2 sqrtint .
|
||||
3 sqrtint .
|
||||
6 sqrtint .
|
||||
7 sqrtint .
|
||||
239 sqrtint .
|
Loading…
Add table
Add a link
Reference in a new issue