Hi everyone, I've posted a few times in here before.
I'm coding in a very limited language in a Minecraft server, specifically Hypixel Housing, called HTSL, and I'm trying to simulate a Logarithm with only lines of arithmetic calculations.
For example:
test = 1000
test /= 10
test *= 10
So I can only do these types of calculations and no if/else statements or for loops or special recursive functions. With that in mind, I'm trying to find the closest graph that can be done with pure arithmetic math (respectively written as a mathematical formula) to match the actual logarithm function but I'm still very far (starting to think it's impossible).
You can use doubles and integers, as well as floor division and absolute value for this, but that's about it.
No for loops, no math.X functions, no if/else statements, no new functions, just pure, arithmetic code.
Anyone know how to do this? The closest I got to using grok ai is this formula in code skulptor, but it's still very far from the actual logarithm formula.
https://py3.codeskulptor.org/#user310_lWdBgHWwTi_0.py
Someone help me pls!
As title suggests, I'll PayPal you $10 if you help me find the best solution.