In the documentation Lua — Codea
There is a log10 function, but it’s not implemented.
That probably happened here. It used to work in a previous version of Codea.
Lua 5.4 deprecated some functions including pow and atan2.
I don’t think I ever used it for anything. I’m sure there’s a replacement, but at the moment I don’t know what it is.
PS. Here’s a replacement for log10.
function setup()
value=25
print(math.log(value)/math.log(10))
end
1 Like
I found that since lua 5.2, the math.log() function accept the base as second parameter. So math.log(xxx,10) did the trick.
Thanks, that’s good to know. @sim The doc needs to be changed to remove the log10 and update log to show a base as the second parameter.
1 Like
Oh thank you for letting me know the docs are out of date there