09-02-2017, 03:34 PM
For positive integer input N the programme returns the integer cube root, ie greatest integer cubed less than or equal to N.
For a random 1000 digit number
3372333255755377535352575733757353775553352277233323272722537325327572553333572527325352752552573533222555227325357735332722375322535733533357722577325522733537222352775325353555732727525257252272325372557722727572575272372577533327275325727332723257375227322223777533522723325527353257753557235322775377375722252335223722525757355532355535723335557752773733555333732222737255732752335355532352737727252757533553227737225222555353575372735233277777572353357333575353773232277227757225253773337573552753732577775335753327372757533572725732725377272723323753752223733772357772257737732225553352323372277333273325325352557275755222353722537332527377733273327772533777523532223235772232752577222735753572237377235752735332253577723573722272757577275757322357537522223327723375235277377527322735757355775372275225532532322223772373575352252555552237577775733733523277325773755253527377255327723337357335337533277732752273275735322753725577273355253527523772553537527735327732557323757327355353375255332733
the programme returns the integer cube root
1499604822677639698136512054951656255507095972124280549377366116496354488818801556346435842736638915543782177873566529474838650069733763644482058793228038399075858205879784127545922713257548599220958054119728466497677793962631860736894025123095727461353431383268937814256969474449057447169458914299094075735363222582741271212646504465
in 70s.
SIZE 127.5
CKSUM # 27E5h
For a random 1000 digit number
3372333255755377535352575733757353775553352277233323272722537325327572553333572527325352752552573533222555227325357735332722375322535733533357722577325522733537222352775325353555732727525257252272325372557722727572575272372577533327275325727332723257375227322223777533522723325527353257753557235322775377375722252335223722525757355532355535723335557752773733555333732222737255732752335355532352737727252757533553227737225222555353575372735233277777572353357333575353773232277227757225253773337573552753732577775335753327372757533572725732725377272723323753752223733772357772257737732225553352323372277333273325325352557275755222353722537332527377733273327772533777523532223235772232752577222735753572237377235752735332253577723573722272757577275757322357537522223327723375235277377527322735757355775372275225532532322223772373575352252555552237577775733733523277325773755253527377255327723337357335337533277732752273275735322753725577273355253527523772553537527735327732557323757327355353375255332733
the programme returns the integer cube root
1499604822677639698136512054951656255507095972124280549377366116496354488818801556346435842736638915543782177873566529474838650069733763644482058793228038399075858205879784127545922713257548599220958054119728466497677793962631860736894025123095727461353431383268937814256969474449057447169458914299094075735363222582741271212646504465
in 70s.
Code:
::
CK1&Dispatch
# FF
::
Z2_
OVER
FPTR2 ^Z>ZH
FPTR2 ^ZBits
BINT3
#/
ROTROT2DROP
#1+
FPTR2 ^PPow#
BEGIN
DUP
BINT3
FPTR2 ^PPow#
DUP
4PICK
DUP
FPTR2 ^RADDext
FPTR2 ^RADDext
3PICK
FPTR2 ^RMULText
SWAPDUP
FPTR2 ^RADDext
4PICK
FPTR2 ^RADDext
FPTR2 ^ZDIVext
DROP
DUPUNROT
Z>
NOT_UNTIL
SWAPDROP
;
;
CKSUM # 27E5h