Add arbitrary base math log (#7409)

Adds new command `math log` that takes as a required positional argument
a base.

Specialized for `math log 2` and `math log 10` for better performance
and precision that matches the expectations there. This leads to
discontinuities in numerical error but should make a better trade-off
for common usecases.


Example testing of the happy path
This commit is contained in:
Stefan Holderbach
2022-12-09 11:20:42 +01:00
committed by GitHub
parent 5a0e86aa70
commit c01d44e37d
3 changed files with 137 additions and 0 deletions

View File

@ -422,6 +422,7 @@ pub fn create_default_context() -> EngineState {
MathTau,
MathEuler,
MathLn,
MathLog,
};
// Network