Skip to content

Missing simplifications #174

@holgerengels

Description

@holgerengels

Description

Some expected simplifications are not applied

Steps to Reproduce

  1. a^n·a^m = a^{n+m)

ce.parse("e^xe^x").simplify()
produces: ["Power","ExponentialE",["Multiply",2,"x"]] .. which is correct

ce.parse("e^{2x}e^x").simplify()
produces: ["Multiply",["Power","ExponentialE","x"],["Power","ExponentialE",["Multiply",2,"x"]]] .. which is unexpected
expected: ["Power","ExponentialE",["Multiply",3,"x"]]

  1. \frac{a^n}{a^m} = a^{n-m)

ce.parse("\\frac{e^x}{e^x}").simplify()
produces: ["Divide",["Power","ExponentialE","x"],["Power","ExponentialE","x"]] .. no simplification takes place
expected: "1"

Version: "@cortex-js/compute-engine": "^0.25.0"
Operating System Linux 6.8.0-35

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions