Skip to content

Effective assignment take much longer to solve #1317

@iils-hwellmann

Description

@iils-hwellmann

Describe the bug

Equations that are effectively simple assignment can take much longer to 'solve'.
I.e. equations for which the left- or right-hand side is a variable and the other side is a algebraic expression without a variable, run magnitudes longer if they are evaluated in the context of the Solve operation.

To Reproduce

Example input Symja input expression:

>> Solve({var0==ArcCos(Sqrt(700000^2+2*700000*6378000)/((700000+6378000)*Cos(-8258413328561117/18014398509481984)))/(884279719003555/281474976710656)},{var0})

Or if one solves it from Java code:

String eq = "Solve({var0==ArcCos(Sqrt(700000^2+2*700000*6378000)/((700000+6378000)*Cos(-8258413328561117/18014398509481984)))/(884279719003555/281474976710656)},{var0})";
IExpr solution = new ExprEvaluator().eval(eq);
System.out.println(solution);

Takes multiple second to evaluate and to print a result with MathEclipse 3.1.1.

Expected behavior

Solves almost instantaneously as effectively only the RHS has to be calculated, like it does with MathEclipse 3.0.0.

Screenshots
If applicable, add screenshots to help explain your problem.

Java

  • Version [e.g. Java 25]
  • OS: all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions