Calculating Logarithm

Hello. this is zza. i am curious of how you could calculate the logarithm of x in hopscotch. since there is no logarithm function.

12 Likes

Hi there. Unfortunately, there is no possible way to calculate log(x) without the logarithm.

4 Likes

You could use a taylor series (while understanding the actual process requires some calculus knowledge, you can find the actual series online and just copy them.)

9 Likes

Welp, 100th time I was wrong.

How many sequences would be enough for it to return an accurate result?

4 Likes

how accurate do you wanna get? theres very easy ways to calculate the difference

6 Likes

I would be nice if a log() function was included along with the other math functions; it definitely merits a place there, as a peer to power().

Can you say a bit about some examples of log()s you want to compute (over what range of values?); that could inform the choice of approximation.

8 Likes

I think there is a way to calculate it with what we have, But a new block would really help!

3 Likes

I agree. Logarithm is a very important math function.

3 Likes