Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-qtype_stack
Commits
d2920828
Commit
d2920828
authored
1 year ago
by
Chris Sangwin
Browse files
Options
Downloads
Patches
Plain Diff
Fix to issue #1066: replace #pm#, where possible, in ATAlgEquiv.
parent
d2b276dd
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
stack/maxima/stackmaxima.mac
+3
-0
3 additions, 0 deletions
stack/maxima/stackmaxima.mac
tests/fixtures/answertestfixtures.class.php
+6
-1
6 additions, 1 deletion
tests/fixtures/answertestfixtures.class.php
with
9 additions
and
1 deletion
stack/maxima/stackmaxima.mac
+
3
−
0
View file @
d2920828
...
...
@@ -1173,6 +1173,9 @@ ATAlgEquivNouns(SA,SB) := block([simp:true, ret, newret, SAN, SBN],
ATAlgEquivfun(SA, SB) := block([SApoly, SBpoly, keepfloat, RawMark, FeedBack, AnswerNote, ret],
Validity:true, RawMark:false, FeedBack:"", AnswerNote:"",
keepfloat:true,
/* Reduce the number of different operators, where possible. */
if ev(is(count_op(SA,STACKpmOPT)=1), simp) then SA:pm_replace(SA),
if ev(is(count_op(SB,STACKpmOPT)=1), simp) then SB:pm_replace(SB),
/* Are we dealing with strings? */
if stringp(SB) then
if stringp(SA)#true then
...
...
This diff is collapsed.
Click to expand it.
tests/fixtures/answertestfixtures.class.php
+
6
−
1
View file @
d2920828
...
...
@@ -329,6 +329,10 @@ class stack_answertest_test_data {
array
(
'AlgEquiv'
,
''
,
'4*x^2-71*x+220 = 0 or 14*x^2-91*x+140 = 0'
,
'x = 5/2 or x = 4 or x=4 or x = 55/4'
,
1
,
'ATEquation_sides'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x^2=4'
,
'x=2 or x=-2'
,
1
,
'ATEquation_ratio'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x^2=4'
,
'x=2 nounor x=-2'
,
1
,
'ATEquation_ratio'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x^2-5*x+6=0'
,
'x=2 nounor x=3'
,
1
,
'ATEquation_sides'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x^2-5*x+6=0'
,
'x=(5 #pm# sqrt(25-24))/2'
,
1
,
'ATEquation_sides'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x^2-5*x+6=0'
,
'x=(5 #pm# sqrt(25-23))/2'
,
0
,
'ATEquation_default'
,
''
),
array
(
'AlgEquiv'
,
''
,
'a^3*b^3=0'
,
'a=0 or b=0'
,
0
,
'ATEquation_default'
,
''
),
array
(
'AlgEquiv'
,
''
,
'a^3*b^3=0'
,
'a*b=0'
,
0
,
'ATEquation_default'
,
''
),
array
(
'AlgEquiv'
,
''
,
'(x-y)*(x+y)=0'
,
'x^2=y^2'
,
1
,
'ATEquation_ratio'
,
''
),
...
...
@@ -574,7 +578,8 @@ class stack_answertest_test_data {
array
(
'AlgEquiv'
,
''
,
'A and (B or C)'
,
'A and (B or C)'
,
1
,
'ATLogic_True.'
,
''
),
array
(
'AlgEquiv'
,
''
,
'(A and B) or (A and C)'
,
'A and (B or C)'
,
1
,
'ATLogic_True.'
,
''
),
array
(
'AlgEquiv'
,
''
,
'-(b#pm#sqrt(b^2-4*a*c))'
,
'-b#pm#sqrt(b^2-4*a*c)'
,
1
,
'ATLogic_True.'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x=-b#pm#c^2'
,
'x=c^2-b or x=-c^2-b'
,
1
,
'ATLogic_True.'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x=-b#pm#c^2'
,
'x=c^2-b or x=-c^2-b'
,
1
,
'ATEquation_sides'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x=b#pm#c^2'
,
'x=c^2-b or x=-c^2-b'
,
0
,
'ATEquation_default'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x#pm#a = y#pm#b'
,
'x#pm#a = y#pm#b'
,
1
,
'ATEquation_sides'
,
''
),
array
(
'AlgEquiv'
,
''
,
'x#pm#a = y#pm#b'
,
'x#pm#a = y#pm#c'
,
0
,
'ATEquation_lhs_notrhs'
,
''
),
array
(
'AlgEquiv'
,
''
,
'not(A) and not(B)'
,
'not(A or B)'
,
1
,
'ATLogic_True.'
,
''
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment