CPUTime - Maple Help

CodeTools

 Usage
 measure time and memory usage information for executing an expression
 CPUTime
 measure CPU time used to execute an expression
 RealTime
 measure real time used to execute an expression
 GCTime
 measure real time used performing garbage collection

 Calling Sequence CodeTools[Usage](expression, options) CodeTools[CPUTime](expression, options) CodeTools[RealTime](expression, options) CodeTools[GCTime](expression, options)

Parameters

 expression - expression options - optional arguments of the form keyword=value; keyword can be one of output, iterations, and quiet

Description

 • The Usage command records time and memory usage statistics for the evaluation of expression.
 • By default, usage statistics are printed and the result of the evaluation of expression is returned.
 • The option output=value can be given to return one of the statistics where value is one of realtime, cputime, gctime, gcrealtime, bytesused, bytesalloc, or output or, to specify multiple outputs, a list of any of these. Multiple outputs are returned in the order they are specified. If the output from evaluating expression is an expression sequence, it will be returned as a list if it appears in the middle of the outputs.
 • output may also be all to return a record containing all the statistics. In this case, the statistics are not printed by default.  Memory is returned in bytes (with IEC binary prefixes) and time is returned in seconds.
 • You can specify an option of the form iterations = posint. This will cause expression to be evaluated the specified number of times, and all results other than bytesalloc to be divided by that same number (bytesalloc is returned unchanged). The default number of iterations is 1.
 Alternatively, you can specify the option as iterations = t, where t is an amount of time expressed using the Units package. In this case, the Usage command will estimate the number of iterations that takes the given amount of real time. Estimating this number takes some time itself; if this estimation process takes close to the amount of time requested, no subsequent run is made anymore. More information about this estimation process can be obtained by setting the infolevel of CodeTools or Usage.
 • The option quiet=truefalse can be given to suppress printing of the statistics (or to force printing when output=all).
 • CPUTime(expression) calls Usage(expression, output=[cputime,output], quiet). It can be passed an option of the form iterations = posint, which is also passed to Usage.
 • RealTime(expression) calls Usage(expression, output=[realtime,output], quiet). It can be passed an option of the form iterations = posint, which is also passed to Usage.
 • GCTime(expression,real=truefalse) calls Usage(expression, output=[gcrealtime,output], quiet) if the second argument is true or Usage(expression, output=[gctime,output], quiet) if the second argument is false (the default). It can be passed an option of the form iterations = posint, which is also passed to Usage.

Examples

 > $\mathrm{with}\left(\mathrm{CodeTools}\right):$
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(32!+1\right)\right)$
 memory used=10.14MiB, alloc change=35.01MiB, cpu time=147.00ms, real time=148.00ms, gc time=10.45ms
 $\left({61146083}\right){}\left({652931}\right){}\left({2889419049474073777}\right){}\left({2281}\right)$ (1)
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(33!+1\right),\mathrm{output}='\mathrm{bytesused}'\right)$
 memory used=7.07MiB, alloc change=-3.01MiB, cpu time=231.00ms, real time=231.00ms, gc time=89.36ms
 ${7408616}$ (2)
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(36!+1\right),\mathrm{output}='\mathrm{all}'\right)$
 ${\mathrm{Record}}{}\left({\mathrm{realtime}}{=}{0.124}{,}{\mathrm{cputime}}{=}{0.123}{,}{\mathrm{gctime}}{=}{0.}{,}{\mathrm{gcrealtime}}{=}{0.}{,}{\mathrm{bytesused}}{=}{15150768}{,}{\mathrm{bytesalloc}}{=}{8392704}{,}{\mathrm{output}}{=}\left({37}\right){}\left({83}\right){}\left({739}\right){}\left({1483}\right){}\left({165202043}\right){}\left({669043459524628666916941}\right)\right)$ (3)
 > $\mathrm{data}≔\mathrm{Usage}\left(\mathrm{ifactor}\left(39!+1\right),\mathrm{output}='\mathrm{all}',\mathrm{quiet}=\mathrm{false}\right)$
 memory used=40.79MiB, alloc change=28.00MiB, cpu time=810.00ms, real time=811.00ms, gc time=102.85ms
 ${\mathrm{data}}{≔}{\mathrm{Record}}{}\left({\mathrm{realtime}}{=}{0.811}{,}{\mathrm{cputime}}{=}{0.810}{,}{\mathrm{gctime}}{=}{0.1028480000}{,}{\mathrm{gcrealtime}}{=}{0.1030340195}{,}{\mathrm{bytesused}}{=}{42769280}{,}{\mathrm{bytesalloc}}{=}{29356032}{,}{\mathrm{output}}{=}\left({79}\right){}\left({57554485363}\right){}\left({146102648914939}\right){}\left({30705821478100704367}\right)\right)$ (4)
 > $\mathrm{data}\left[\mathrm{bytesused}\right]$
 ${42769280}$ (5)
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(40!+1\right),\mathrm{output}=\left['\mathrm{cputime}','\mathrm{bytesused}'\right]\right)$
 memory used=4.19MiB, alloc change=0 bytes, cpu time=92.00ms, real time=92.00ms, gc time=0ns
 ${0.092}{,}{4393872}$ (6)
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(42!+1\right),\mathrm{output}=\left['\mathrm{cputime}','\mathrm{bytesused}'\right],\mathrm{quiet}\right)$
 ${1.581}{,}{80452704}$ (7)

The following takes too little resources to give useful information. Increasing the number of iterations improves this.

 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(15!+1\right)\right)$
 memory used=4.58KiB, alloc change=0 bytes, cpu time=0ns, real time=0ns, gc time=0ns
 $\left({59}\right){}\left({479}\right){}\left({46271341}\right)$ (8)
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(15!+1\right),\mathrm{iterations}={10}^{6}\right)$
 memory used=48 bytes, alloc change=32.00MiB, cpu time=1.51us, real time=1.43us, gc time=1.8e+02ns
 $\left({59}\right){}\left({479}\right){}\left({46271341}\right)$ (9)
 > $\mathrm{infolevel}\left[\mathrm{Usage}\right]≔5:$
 > $\mathrm{Usage}\left(\mathrm{ifactor}\left(15!+1\right),\mathrm{iterations}=2\mathrm{Unit}\left(s\right)\right)$
 Usage:   "trying out"   1   "iteration" Usage:   "trying out"   2   "iterations" Usage:   "trying out"   4   "iterations" Usage:   "trying out"   8   "iterations" Usage:   "trying out"   16   "iterations" Usage:   "trying out"   32   "iterations" Usage:   "trying out"   64   "iterations" Usage:   "trying out"   128   "iterations" Usage:   "trying out"   256   "iterations" Usage:   "trying out"   512   "iterations" Usage:   "trying out"   1024   "iterations" Usage:   "trying out"   2048   "iterations" Usage:   "trying out"   4096   "iterations" Usage:   "trying out"   8192   "iterations" Usage:   "trying out"   16384   "iterations" Usage:   "trying out"   32768   "iterations" Usage:   "trying out"   65536   "iterations" Usage:   "trying out"   131072   "iterations" Usage:   "setting iterations to"   1702233 memory used=48 bytes, alloc change=0 bytes, cpu time=1.41us, real time=1.37us, gc time=88ns
 $\left({59}\right){}\left({479}\right){}\left({46271341}\right)$ (10)
 > $\mathrm{unassign}\left('\mathrm{infolevel}\left[\mathrm{Usage}\right]'\right)$
 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{Usage}\left(\mathrm{LUDecomposition}\left(\mathrm{RandomMatrix}\left(25\right)\right),\mathrm{output}='\mathrm{all}'\right)$
 ${\mathrm{Record}}{}\left({\mathrm{realtime}}{=}{0.031}{,}{\mathrm{cputime}}{=}{0.032}{,}{\mathrm{gctime}}{=}{0.}{,}{\mathrm{gcrealtime}}{=}{0.}{,}{\mathrm{bytesused}}{=}{2995584}{,}{\mathrm{bytesalloc}}{=}{0}{,}{\mathrm{output}}{=}\left(\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{25 × 25 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{42}}{{17}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{87}}{{17}}& \frac{{6075}}{{3526}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{62}}{{17}}& \frac{{3085}}{{1763}}& {-}\frac{{1639}}{{23684}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{97}}{{17}}& {-}\frac{{225}}{{82}}& {-}\frac{{5461}}{{94736}}& {-}\frac{{13691325}}{{18134692}}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{7}}{{17}}& \frac{{563}}{{1763}}& {-}\frac{{27833}}{{47368}}& \frac{{4218655}}{{9067346}}& {-}\frac{{236063042}}{{244297477}}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{96}}{{17}}& \frac{{5057}}{{1763}}& \frac{{270029}}{{189472}}& {-}\frac{{100959515}}{{36269384}}& {-}\frac{{1435320937}}{{488594954}}& \frac{{3234244525}}{{324347408}}& {1}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{90}}{{17}}& \frac{{7359}}{{3526}}& \frac{{9725}}{{189472}}& \frac{{85996661}}{{36269384}}& {-}\frac{{3411373985}}{{488594954}}& {-}\frac{{67681957907}}{{12973896320}}& \frac{{58657712363}}{{85502982200}}& {1}& {0}& {0}& {\dots }\\ {-}\frac{{3}}{{17}}& \frac{{11}}{{86}}& {-}\frac{{57769}}{{94736}}& \frac{{23347183}}{{18134692}}& {-}\frac{{2459733623}}{{244297477}}& {-}\frac{{9949386317}}{{12973896320}}& \frac{{7637133356509}}{{6241717700600}}& {-}\frac{{480012914951}}{{11735234739}}& {1}& {0}& {\dots }\\ {-}\frac{{50}}{{17}}& \frac{{4553}}{{3526}}& \frac{{23379}}{{189472}}& \frac{{25344411}}{{36269384}}& {-}\frac{{3278452047}}{{488594954}}& {-}\frac{{345492883}}{{294861280}}& \frac{{1224795640321}}{{1560429425150}}& {-}\frac{{3481522892528}}{{35205704217}}& \frac{{38969915088279623}}{{16279433156969097}}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{25 × 25 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{-17}& {88}& {-28}& {-53}& {-41}& {16}& {85}& {48}& {66}& {-37}& {\dots }\\ {0}& \frac{{3526}}{{17}}& {-}\frac{{462}}{{17}}& {-}\frac{{985}}{{17}}& {-}\frac{{1705}}{{17}}& {-}\frac{{246}}{{17}}& {132}& \frac{{2407}}{{17}}& \frac{{2211}}{{17}}& {-}\frac{{1554}}{{17}}& {\dots }\\ {0}& {0}& {-}\frac{{189472}}{{1763}}& {-}\frac{{805365}}{{3526}}& {-}\frac{{419683}}{{3526}}& \frac{{3905}}{{43}}& \frac{{529914}}{{1763}}& {-}\frac{{205557}}{{3526}}& \frac{{605359}}{{3526}}& {-}\frac{{227177}}{{1763}}& {\dots }\\ {0}& {0}& {0}& {-}\frac{{4533673}}{{47368}}& {-}\frac{{3849399}}{{47368}}& \frac{{3480577}}{{23684}}& \frac{{69073}}{{382}}& {-}\frac{{7992633}}{{47368}}& \frac{{994843}}{{47368}}& \frac{{1683911}}{{23684}}& {\dots }\\ {0}& {0}& {0}& {0}& {-}\frac{{244297477}}{{18134692}}& \frac{{148450309}}{{18134692}}& {-}\frac{{887936929}}{{18134692}}& {-}\frac{{445478493}}{{9067346}}& {-}\frac{{752285631}}{{9067346}}& \frac{{209330681}}{{18134692}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& \frac{{12973896320}}{{244297477}}& \frac{{13930168811}}{{244297477}}& {-}\frac{{11646681099}}{{244297477}}& {-}\frac{{6698181006}}{{244297477}}& {-}\frac{{2121713087}}{{244297477}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{156042942515}}{{324347408}}& {-}\frac{{63125230797}}{{324347408}}& {-}\frac{{2386860555}}{{14743064}}& \frac{{189851167087}}{{324347408}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& \frac{{105617112651}}{{42751491100}}& {-}\frac{{2342371492881}}{{3420119288}}& {-}\frac{{82311276666579}}{{171005964400}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{5426477718989699}}{{190371585766}}& {-}\frac{{321074817913177}}{{15646979652}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& \frac{{37716822409615032883}}{{32558866313938194}}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{25 × 25 Matrix}}\end{array}\right)\right)$ (11)
 > $\mathrm{Usage}\left(\mathrm{LUDecomposition}\left(\mathrm{RandomMatrix}\left(35\right)\right),\mathrm{output}=\left['\mathrm{cputime}','\mathrm{output}'\right]\right)$
 memory used=8.45MiB, alloc change=0 bytes, cpu time=84.00ms, real time=84.00ms, gc time=0ns
 ${0.084}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{35 × 35 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{4}}{{9}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{14}}{{99}}& {-}\frac{{2617}}{{10912}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{13}}{{33}}& {-}\frac{{3507}}{{10912}}& \frac{{7541}}{{10783}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{1}}{{11}}& \frac{{9369}}{{10912}}& {-}\frac{{2857}}{{75481}}& \frac{{3080697}}{{1713040}}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{92}}{{99}}& \frac{{481}}{{5456}}& \frac{{35822}}{{75481}}& {-}\frac{{5588381}}{{342608}}& {-}\frac{{741498875}}{{159927331}}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{31}}{{99}}& \frac{{9875}}{{10912}}& {-}\frac{{5083}}{{1841}}& \frac{{1814209}}{{856520}}& \frac{{52169694}}{{159927331}}& {-}\frac{{17383292036}}{{41393870871}}& {1}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{13}}{{33}}& \frac{{8457}}{{10912}}& {-}\frac{{283739}}{{226443}}& {-}\frac{{13098811}}{{2569560}}& {-}\frac{{980236946}}{{479781993}}& \frac{{451764599}}{{124181612613}}& \frac{{541113909554}}{{87928610565}}& {1}& {0}& {0}& {\dots }\\ \frac{{14}}{{33}}& {-}\frac{{807}}{{5456}}& {-}\frac{{303158}}{{226443}}& \frac{{2196787}}{{513912}}& \frac{{394194970}}{{479781993}}& {-}\frac{{27999436291}}{{124181612613}}& {-}\frac{{806336691616}}{{87928610565}}& {-}\frac{{53177926064213}}{{26644530981787}}& {1}& {0}& {\dots }\\ \frac{{83}}{{99}}& {-}\frac{{3925}}{{10912}}& \frac{{397567}}{{226443}}& {-}\frac{{4354543}}{{2569560}}& {-}\frac{{11098298}}{{479781993}}& \frac{{60759038597}}{{124181612613}}& \frac{{489285686581}}{{703428884520}}& \frac{{80943139146133}}{{213156247854296}}& {-}\frac{{88654039043646749}}{{70828307978802768}}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{35 × 35 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{-99}& {-95}& {7}& {-85}& {7}& {77}& {-20}& {82}& {-38}& {-30}& {\dots }\\ {0}& {-}\frac{{992}}{{9}}& \frac{{694}}{{9}}& {-}\frac{{727}}{{9}}& \frac{{208}}{{9}}& \frac{{47}}{{9}}& {-}\frac{{449}}{{9}}& \frac{{724}}{{9}}& {-}\frac{{323}}{{9}}& {-}\frac{{112}}{{3}}& {\dots }\\ {0}& {0}& \frac{{226443}}{{5456}}& {-}\frac{{298471}}{{10912}}& \frac{{3787}}{{682}}& {-}\frac{{105153}}{{10912}}& {-}\frac{{252465}}{{10912}}& \frac{{173765}}{{2728}}& \frac{{73837}}{{10912}}& {-}\frac{{44133}}{{682}}& {\dots }\\ {0}& {0}& {0}& {-}\frac{{122360}}{{10783}}& \frac{{633898}}{{10783}}& {-}\frac{{495110}}{{10783}}& \frac{{399244}}{{10783}}& {-}\frac{{118558}}{{10783}}& {-}\frac{{229643}}{{10783}}& \frac{{1467295}}{{10783}}& {\dots }\\ {0}& {0}& {0}& {0}& {-}\frac{{159927331}}{{856520}}& \frac{{3101227}}{{24472}}& {-}\frac{{27170999}}{{428260}}& {-}\frac{{115999159}}{{856520}}& \frac{{261950037}}{{1713040}}& {-}\frac{{82855173}}{{342608}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {-}\frac{{41393870871}}{{159927331}}& \frac{{52573494482}}{{159927331}}& {-}\frac{{152216545765}}{{159927331}}& \frac{{56434476438}}{{159927331}}& \frac{{170989309116}}{{159927331}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& \frac{{468952589680}}{{41393870871}}& {-}\frac{{8506009685069}}{{41393870871}}& \frac{{3523395248875}}{{27595913914}}& \frac{{3018626747791}}{{27595913914}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& \frac{{26644530981787}}{{29309536855}}& {-}\frac{{9985842567347}}{{17585722113}}& {-}\frac{{14726656675692}}{{29309536855}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& \frac{{1475589749558391}}{{26644530981787}}& {-}\frac{{3331377425440389}}{{26644530981787}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{1576626819570473083}}{{11804717996467128}}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{35 × 35 Matrix}}\end{array}$ (12)
 > $\mathrm{Usage}\left(\mathrm{LUDecomposition}\left(\mathrm{RandomMatrix}\left(45\right)\right),\mathrm{output}=\left['\mathrm{cputime}','\mathrm{output}','\mathrm{bytesused}'\right]\right)$
 memory used=20.15MiB, alloc change=32.00MiB, cpu time=385.00ms, real time=311.00ms, gc time=157.24ms
 ${0.385}{,}\left[\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {0}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{45 × 45 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{7}}{{6}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{11}}{{42}}& {-}\frac{{2755}}{{3787}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{12}}{{7}}& {-}\frac{{5598}}{{3787}}& {-}\frac{{3629}}{{1642}}& {1}& {0}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{23}}{{21}}& {-}\frac{{2656}}{{3787}}& {-}\frac{{32325}}{{5747}}& \frac{{2862316}}{{1714111}}& {1}& {0}& {0}& {0}& {0}& {0}& {\dots }\\ \frac{{27}}{{14}}& \frac{{4161}}{{3787}}& \frac{{42415}}{{11494}}& {-}\frac{{3640409}}{{3428222}}& {-}\frac{{31108246}}{{22478763}}& {1}& {0}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{3}}{{7}}& {-}\frac{{4518}}{{3787}}& {-}\frac{{1749}}{{5747}}& \frac{{1392885}}{{3428222}}& {-}\frac{{193190936}}{{22478763}}& {-}\frac{{10596359743}}{{84717517}}& {1}& {0}& {0}& {0}& {\dots }\\ {-}\frac{{97}}{{42}}& {-}\frac{{10165}}{{3787}}& {-}\frac{{27299}}{{5747}}& \frac{{10763883}}{{3428222}}& \frac{{133583858}}{{7492921}}& {-}\frac{{6522994437}}{{84717517}}& \frac{{166287575079}}{{675564329900}}& {1}& {0}& {0}& {\dots }\\ {-}\frac{{1}}{{14}}& {-}\frac{{3231}}{{3787}}& \frac{{3693}}{{11494}}& {-}\frac{{1177438}}{{1714111}}& {-}\frac{{199699432}}{{22478763}}& \frac{{4861801624}}{{84717517}}& {-}\frac{{65052079813}}{{270225731960}}& {-}\frac{{1329295529862945}}{{2202912024234974}}& {1}& {0}& {\dots }\\ \frac{{47}}{{21}}& \frac{{13108}}{{3787}}& \frac{{32360}}{{5747}}& {-}\frac{{14825885}}{{3428222}}& {-}\frac{{121132328}}{{7492921}}& \frac{{18387010539}}{{84717517}}& {-}\frac{{83066405951}}{{67556432990}}& {-}\frac{{1390521274561130}}{{1101456012117487}}& {-}\frac{{839964396350702283}}{{20321896236904567}}& {1}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{45 × 45 Matrix}}\end{array}{,}\begin{array}{c}\left[\begin{array}{ccccccccccc}{42}& {-97}& {-59}& {37}& {90}& {0}& {90}& {88}& {93}& {-29}& {\dots }\\ {0}& \frac{{541}}{{6}}& \frac{{155}}{{6}}& \frac{{167}}{{6}}& {-87}& {51}& {-156}& {-}\frac{{293}}{{3}}& {-}\frac{{83}}{{2}}& \frac{{293}}{{6}}& {\dots }\\ {0}& {0}& \frac{{11494}}{{541}}& \frac{{81640}}{{3787}}& {-}\frac{{94156}}{{3787}}& \frac{{212458}}{{3787}}& {-}\frac{{625081}}{{3787}}& {-}\frac{{102624}}{{3787}}& {-}\frac{{161129}}{{3787}}& {-}\frac{{7116}}{{3787}}& {\dots }\\ {0}& {0}& {0}& \frac{{489746}}{{5747}}& {-}\frac{{524522}}{{5747}}& \frac{{1490659}}{{5747}}& {-}\frac{{5552933}}{{11494}}& \frac{{106854}}{{5747}}& \frac{{1115459}}{{11494}}& \frac{{323665}}{{5747}}& {\dots }\\ {0}& {0}& {0}& {0}& \frac{{22478763}}{{1714111}}& {-}\frac{{25375297}}{{1714111}}& {-}\frac{{172289399}}{{1714111}}& {-}\frac{{143279144}}{{1714111}}& {-}\frac{{460446964}}{{1714111}}& {-}\frac{{55068143}}{{1714111}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& \frac{{84717517}}{{44957526}}& {-}\frac{{5051476505}}{{89915052}}& \frac{{59906863}}{{22478763}}& {-}\frac{{20540104957}}{{89915052}}& \frac{{3711327095}}{{44957526}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{675564329900}}{{84717517}}& {-}\frac{{35806112101}}{{84717517}}& {-}\frac{{2628490364476}}{{84717517}}& \frac{{854101002383}}{{84717517}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& \frac{{1101456012117487}}{{675564329900}}& {-}\frac{{925099931691322}}{{168891082475}}& \frac{{2860849621769979}}{{675564329900}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{20321896236904567}}{{1101456012117487}}& {-}\frac{{4048790918881245}}{{1101456012117487}}& {\dots }\\ {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {0}& {-}\frac{{14870721935020790252}}{{20321896236904567}}& {\dots }\\ {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {⋮}& {}\end{array}\right]\\ \hfill {\text{45 × 45 Matrix}}\end{array}\right]{,}{21130208}$ (13)
 > $\mathrm{CPUTime}\left(\mathrm{ifactor}\left(45!+1\right)\right)$
 ${2.916}{,}\left({293}\right){}\left({19789544034049}\right){}\left({20630438210640397406279590400959696408493}\right)$ (14)
 > $\mathrm{RealTime}\left(\mathrm{ifactor}\left(46!+1\right)\right)$
 ${6.725}{,}\left({47}\right){}\left({268662306503771535067}\right){}\left({435777793891607546778854755077304349}\right)$ (15)
 > $\mathrm{GCTime}\left(\mathrm{ifactor}\left(45!+1\right)\right)$
 ${0.238714000}{,}\left({293}\right){}\left({19789544034049}\right){}\left({20630438210640397406279590400959696408493}\right)$ (16)
 > $\mathrm{GCTime}\left(\mathrm{ifactor}\left(46!+1\right),\mathrm{real}=\mathrm{true}\right)$
 ${0.329565048}{,}\left({47}\right){}\left({268662306503771535067}\right){}\left({435777793891607546778854755077304349}\right)$ (17)

Compatibility

 • The iterations option was introduced in Maple 15.
 • The iterations option was updated in Maple 16.
 • The output option was updated in Maple 18.
 • The CodeTools[Usage] command was updated in Maple 2017.
 • The GCTime option was updated in Maple 2017.