Originally Posted by: RegCurry Well, I couldn't sleep; I clearly had to take a look.
Hello Reg,
Read slow as you have opened the attached.
Cf(x) is the classical continued fraction that is used to compare
the timing with and without eval(,) in the computation of 'data'.
Calling for the plots has no effect on the timing as they are both
same consumers. So, eval(,) is 15 s ... w/o eval(,) 42 s.
The catch is here ...
If you want to code the Cf(x) in Excel or else pocket calculator,
you will have to code bottom-up. BTW: continued fractions date back
to Mesopotamians, how old ?
At this point, continued fractions can be computed top down using
Wallis algorithm [Wallis was Newton's teacher].
This method was implemented in the first computing machinery,
typical in some IBM kind of Main Frame.
This coding is implemented in machine code in Mathcad, Smath
maybe other CAS. Thus, it is hyperfast so that with or w/o eval(,)
has visible effect but only 1/3 in this example.
Instead, if the function would be a most demanding parametric
function involving ln(x), exp(x) and/or other advanced functions
evaluation of data would range much higher [or lower timing]
ranging from little seconds to fat minutes.
Also, some program have to be included in eval(program).
Does that make you sleep deeper ?
Jean
Reg[eval].sm (30kb) downloaded 24 time(s).