Godot: Other bases for logarithm function

Created on 22 Jun 2017  路  9Comments  路  Source: godotengine/godot

Hello,
Please add base for logarithm function.
Thanks :)

archived discussion enhancement gdscript

Most helpful comment

Just to mention the usual way to do this -- use log(x) / log(base)wikipedia.

All 9 comments

Just to mention the usual way to do this -- use log(x) / log(base)wikipedia.

For comparison, in math.h from the standard C library, there no log function available with a base parameter. However, log2 and log10 function exists.

As bojidar-bg mentioned, changing base of log is a trivial operation, thus imho it should not clutter API up.

I would say, eventually, mimic C library, as indicated by groud.

@bojidar-bg I'd forgotten that rule! (why? :smile: ) Thanks.
Python has log(x[, base]) and also log2 and log10.

In that case, implement them all ^^ https://docs.python.org/3/library/math.html

Is there a performance gain in log2 and log10 functions? Maintaning 3 versions of the log(x, base) function with out any significant gain is wrong I think.

If they are implemented with base-dependant improvements, such as lookup tables, their implementation could be faster. But well, even if their are implemented, that's not the kind of code that need a lot of maintenance work.

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

As there was no update since the previous post, we close this issue.

If it is still relevant in the way it was described and discussed above, please comment to ask for it to be reevaluated. If it is only partly relevant, or if the original issue has changed, it would be better to open a new issue (potentially referring to this one) focused on the current state.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ndee85 picture ndee85  路  3Comments

bojidar-bg picture bojidar-bg  路  3Comments

SleepProgger picture SleepProgger  路  3Comments

blurymind picture blurymind  路  3Comments

nunodonato picture nunodonato  路  3Comments