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

Simplifying Logarithms of Fractions #22

@trkern

Description

@trkern

"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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions