Ticket #1555 (new defect)
Solving Multiple Rows containing Unnamed Equations
| Reported by: | alexander.hartl | Owned by: | simon |
|---|---|---|---|
| Priority: | very high | Milestone: | GeoGebra 4.2 |
| Component: | CAS / MPReduce | Keywords: | solve, multiple, unnamed, equation |
| Cc: | markus, johannes | Estimate (h): | 0 |
| Progress (%): | 0 |
Description
Though solving multiple rows containing named equations seems to be working fine, solving multiple rows of unnamed equations is not. Example:
- Open CAS view,
- Enter "3 * x + 4 * y = 7" into the first row,
- Evaluate,
- Enter "x - 3 * y = 3" into the second row,
- Evaluate,
- Select the first two rows,
- Click the solve tool.
The above yields "{$1, $2}" in the third row, which in turn yields "Sorry, something went wrong. Please check your input".
Naming the equation in the first row a and the equation in second row b the solve tool yields "{a, b}" in the third row, which in turn is solved correctly.
Also see ticket #1556.
This ticket replaces ticket #343.
Note: See
TracTickets for help on using
tickets.

I think something went wrong during the parsing.
The MPReduce string looks:
MPReduce: <<keepinput!!:=0$ numeric!!:=0$ precision 30$ print_precision 16$ off complex, rounded, numval, factor, div, combinelogs, expandlogs, pri$ currentx!!:= ggbcasvar1x; currenty!!:= ggbcasvar1y;<< begin scalar equations!!; equations!!:=(listofliststomat(list(ggbcasvar1$1, ggbcasvar1$2))); if arglength(equations!!)>-1 and part(equations!!,0)='list then equations!!:=mkdepthone(equations!!); return flattenlist(mysolve(aeval(equations!!),listofliststomat(list(ggbcasvar1x, ggbcasvar1y)))) end >>>>
also the validexpression tree looks quite strange.
The same thing happend when i type the solve command by hand like
Solve[{$1, $2},{x,y}]
for 1,2 were the linenumbers of the two equations