I am writing a public ResourceFunction
and I need a good clever use case that should not appear to emulate any examples in the official documentation but will consider examples not commonly used. Definitely no Pause or deliberate time lags. Expression should be as short as possible while take close to 10 seconds to evaluate. I prefer expression NOT be Table
, Do
,For
,While
, or any other loops or iterators but I shall consider them.
So far I have one expression expr1
that uses a Do
with no Pause
which evaluates on my old laptop in just over 8 seconds.
expr1 = Timing[sum = 0; Do[sum += i, {i, 5000000}]; sum]
Here are a few examples of what I tried for expr2
but were too fast and even broke my Timing
function. Quit
and ClearSystemCache[]
did not fix it. There were other things I tried but did not work.
(* results in {0.,3.68*10^(30102999)} *)
expr2=Timing[n=2.^1000000000;ScientificForm[n,3]]
(* results in {0.,9.58*10^(301029995663) *)
expr2=Timing[n=2.^1000000000;ScientificForm[n,3]]
In short expr2 should be:
- must use mathematics
- prefer not in docs (not a hard requirement)
- short as possible
- no Pause or other deliberate lags
- prefer no loops or iterators (not a hard requirement)
- timing close to 10 seconds
Thank you. I am looking forward to what you guys come up with.
PadeApproximant[MittagLefflerE[4, x], {x, 1, 6}] // AbsoluteTiming
which results in{62.3867, large output}
? $\endgroup$PadeApproximant[MittagLefflerE[4, x], {x, 1, 5}] // AbsoluteTiming
is executed in 6.36297 s. $\endgroup$