Hello. CL beginner here.
I’m replicating this graph on the calculator
for a Desmos activity to investigate the convergence of the integral of a tetration tending to an infinite power tower in the interval where it converges (between 0 and e^(1/e)). I’m doing this because in calculator, when I display the results in a table, they appear with fewer significant digits than in the cell where they were calculated. Googling, I discovered that in an activity I can create tables where non-integer numbers are displayed with the full precision used by the tool. So, I started this one:
And it really does ![]()
The idea is to manually change the value of n in the first table and, when the values are finally calculated, copy and paste the first 4 into the second table in the appropriate row, leaving the last 2 values to be automatically calculated.
Eventually, I will try to automatically fill (with something that replaces the loop, because I already discovered that this concept was not implemented in CL) the initial cells of the second table of values for several n with the result of “running” the graph for those n, but that is for the future.
For now, I have this code, valid for a specific row of the 20-row table:
I_1 = this.cellNumericValue(1,2)
I_2 = this.cellNumericValue(1,3)
I_3 = this.cellNumericValue(1,4)
I_4 = this.cellNumericValue(1,5)
I_5 = numericValue("${I_1}+${I_2}+${I_3}")
I_6 = numericValue("${I_5}+${I_4}")
cellContent(1,6): when isDefined(I_1) and isDefined(I_2) and isDefined(I_3) "${I_5}" otherwise ""
cellContent(1,7): when isDefined(I_5) and isDefined(I_4) "${I_6}" otherwise ""
Now I’m trying to write something smarter, perhaps leaner, and most importantly, valid for all 20 lines. After a lot of research, I’ve put together ideas that seem like they would work, but don’t:
sum = simpleFunction( "when isDefined(a) and isDefined(b) and isDefined(c) a+b+c otherwise ''", "a", "b", "c" )
cellContent(row,6): sum.evaluateAt( this.cellNumericValue(row,2), this.cellNumericValue(row,3), this.cellNumericValue(row,4) )
cellContent(row,7): sum.evaluateAt( this.cellNumericValue(row,6), this.cellNumericValue(row,5), 0 )
Even replacing row with a number (1, for example), it doesn’t work.
I saw here some old questions about the same problem: valid code for multiple rows in a table, but no really good solution, apparently.
Can I solve the problem without cramming a bunch of code over and over again?
Extra problem 1: I just resynchronized the activity graph with the calculator graph where I now calculate, using Newton’s method, the minimum of the “even” tetration (even number of iterated powers) and discovered that apparently the recursion that determines the x coordinate of the minimum cannot be executed by the activity, even though it shows a preview of the graph when I am editing it ![]()
Extra problem 2: the width of the component to accommodate the table across its entire width without scroll bars even when the screen is large enough is another “problem” that doesn’t seem to have a satisfactory solution ![]()
Thank you in advance for any considerations.