Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Simplifying Logarithms of Fractions #22

Open
trkern opened this issue Nov 28, 2019 · 1 comment
Open

Simplifying Logarithms of Fractions #22

trkern opened this issue Nov 28, 2019 · 1 comment

Comments

@trkern
Copy link

trkern commented Nov 28, 2019

"KAS.parse("log(.1)").expr.simplify().print()" outputs "log_(10) (0.1)". Any chance of getting it to output "-1"?

Simplify correctly handles "-log(1/.1)", so this should be as simple as checking which of log(x) and -log(1/x) is simpler, and returning that.

Similarly for "KAS.parse("log_(9) (3)").expr.simplify().print()" which outputs "log_(9) (3)" but should output "1/2". Just check which of log_(a)(b) and 1/(log_(b)(a)) is simpler and return that, once you've handled log_(3)(9) (which also doesn't simplify).

@kevinbarabash
Copy link

What you've suggested seems like pretty reasonable changes to make.

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

No branches or pull requests

2 participants