Yea, em… I had a blackout :D/>/>/>/>/> 3^10 = 10*10*10 = 1000
Ahem…
3^10 = 3*3*3*3*3*3*3*3*3*3 = 59049
In math, we say that the
exponentiation is not
commutative.
What they do: math.ldexp won't work in Lua, it will always error
Where you can use: never
What they do: math.exp
math.exp(myval) returns e (the base of natural logarithms) raised to the power myval. math.log() returns the inverse of this. math.exp(1) returns e.
Where you can use: not sure.
Though I have not yet either saw any of them in CC user program, nor used them myself in lua, ldexp might be more usefull as exp, and is surely more understandable.
Imagine you made/download a self replicating program, that, on a mining Turtle, let him replicate every 24 hours. If you run it, after one day, you will have 2 turtles. The second day, they will both replicate, so you will have 4 turtles. Then 8, 16 and so on.
If you began with 3 turtles, after a month, you will have 3 * 2^30 turtles, which is a lot…
And 3 * 2^30 is math.ldexp ( 3, 30)
Computers think binary, that's why I think it can be more useful than the natural exponential, which rather is for mathematicians. I think one reason for it does not exist in Computercraft is that it does exactly the same thing as bit.blshift and bit.blogic_rshift. Can by used for encoding/decoding data.
back to my dumbness :
Spoiler
If we take on account the lag, ours turtles will quick replicate very slower, and be limited by the number of (real) operations needed to replicate, so will grow linearly.
Suppose now that our (real) computer is infinitely fast, we will be limited by memory.
Suppose we have infinite memory, we will suffer of quadratic growth, due to the 2D nature of minecraft (well, it's thick, but quite thin considering its length).
It would be interesting to know whether we reach this limit before limitation of minecraft itself. Indeed, the world is finite (2*30.000.000 by 2*30.000.000 by 256), but it would take 34 days to an human to reach its edges, and a turtle is quite slower, and suffers from 1-Norm : a human takes sqrt(2) more times to go to the corner than to go to the edges, a turtle takes twice that time.
If we suppose exponential growth, the whole world would have been filled with turtles in less than 60 days (log2(2*30.000.000 *2*30.000.000 *256)), and less than 37 days if you consider there are 6 diamonds a chunk, ignoring the time for travelling…