How to use a logarithm in Blueprint?

Hi, I would like to make logarithm operations in blueprints, how to do that?

Hi, it appears there’s only a natural log node at present. Are you wanting to do logarithms to any other base?

4121-such+log,+very+math.png

Thanks for the answer, but yes, it would be great to be able to use other bases too (to use stuff such as ln).

Just to clarify, log base e is the same as ln. If you wanted to find the log with a different base, say 10, you could use the following trick:

result = loge(x) / loge(10)

OK, thanks, I thought that the log in the image was log with base 10 (but of course the “e” is saying it’s ln).

The logarithm of 100 to base 10 is equal to 2.
The base is changed with the property “change base” from E to 10. Since the unreal engine loge in the blueprints is natural logarithm (e) and if you need to change the base you have to use that logarithm property.

1 Like

thank you, it’s working.