Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logarithms to Arbitrary Bases & n Roots #1

Closed
creativecreatorormaybenot opened this issue Feb 16, 2021 · 2 comments
Closed

Logarithms to Arbitrary Bases & n Roots #1

creativecreatorormaybenot opened this issue Feb 16, 2021 · 2 comments

Comments

@creativecreatorormaybenot
Copy link

creativecreatorormaybenot commented Feb 16, 2021

Hi @ram6ler - thanks for creating this awesome package ✨ The functionality is amazing.

It integrates quite well with math_expressions (the string reprensentations in that package) and it supports almost all of the same functions. However, there is one missing feature we noticed.

Feature request: log(n, c) & nrt(n, c)

In math_expressions, you can define a logarithm to an arbitrary base n using log(n, c). The same goes for sqrt.

It would be great if this package would also support those and it seems relatively straight-forward:

  • log supports either log(c) or log(n, c) (not a breaking change). This would look like this when converted to TeX → \log{c} & \log_n{c}
  • sqrt supports either sqrt(c) or nrt(n, c) (also not a breaking change). This would look like this when converted to TeX → \sqrt{c} & \sqrt[n]{c}.

For the functionMap part, it should also be straight-forward:

  • log(n, c) would be (n, c) => log(c) / log(n)
  • nrt(n, c) would be (n, c) => pow(c, 1 / n)
@ram6ler
Copy link
Owner

ram6ler commented Feb 18, 2021

Thanks for your interest in this library and for your suggestions. In the end I created a new class to deal with these types of functions; in addition to log and nrt I've implemented vanilla flavored pow.

@ram6ler ram6ler closed this as completed Feb 18, 2021
@creativecreatorormaybenot
Copy link
Author

@ram6ler Thank you so much for this ❤️ This is totally awesome ✨

Also like the vanilla pow as an easy addition 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants