Missing log10 from codea 3.6

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

Hello all
Years later, even after 4.x modern version is released, math.log10() function is still not available - which is not an issue - but 4.x documentation which is still in development and in progress mentioned it as available … maybe a collaborative work like Wikipedia could help maintaining doc with better efficiency and contribute to energize and build a community of lua/CODEA developers
Cheers