-
Notifications
You must be signed in to change notification settings - Fork 41
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
Implement logarithms with bases other than E [FEATURE] #184
Comments
log of arbitrary base should already be handled through canonicalization. Do those represent cases that don’t work even though they should or is it just a placeholder list of possible simplifications? Could you check which ones are actually necessary? You could also submit a PR with corresponding test cases. The relevant file should be test/compute-engine/simplify.test.ts |
I just checked and the are actually recognized by MathJSON. I had assumed that log_2 was not implemented because none of the log simplification rules worked for it. I will work on that. I will make the PR once the custom simplification rules can be implemented (it is a different bug) |
\log_c
should be interpreted as a log with base cRelevant simplification rules
Undefined
{match:\log_c(a),replace:NaN,condition:c==1}
{match:\log_c(a),replace:NaN,condition:c\le 0}
\log_c(0)->NaN
Simple
\log_c(1)->0
\log_c(c)->1
,\log_c(c^a)->a
Log Properties
\log_c(ab)->\log_c(a)+\log_c(b)
\log_c(\frac{a}{b})->\log_c(a)-\log_c(b)
\log_c(\frac{1}{b})=-\log_c(b)
\log_c(c^ab)->a+\log_c(b)
\log_c(\frac{c^a}{b})->a-\log_c(b)
\log_c(\frac{b}{c^a})->\log_c(b)-a
\log_c(b^a)->a\log_c(b)
Change of Base
\log_c(b)\ln(c)->\ln(b)
\frac{\log_c(b)}{\log_d(b)}->\frac{\ln(d)}{\ln(c)}
\log_{1/c}(b)->-\log_c(b)
Base of C
c^{\log_c(a)}->a
c^{b\log_c(a)}->a^b
c^{\log_c(a)+b}->a\cdot c^b
c^{\log_c(a)-b}->\frac{a}{c^b}
c^{d\log_c(a)+b}->a^d\cdot c^b
c^{\log_c(a)-b}->\frac{a^d}{c^b}
c^{-\log_c(a)-b}->\frac{1}{a^dc^b}
c^{-\log_c(a)+b}->\frac{b^c}{a^d}
Infinity
{match:\log_c(\infty),replace:\infty,condition:c>1}
{match:\log_c(\infty),replace:-\infty,condition:0<c<1}
The text was updated successfully, but these errors were encountered: