Expression randomly reordering

12 views
Skip to first unread message

Heber Nelski

unread,
Nov 9, 2025, 6:32:43 PM (14 days ago) Nov 9
to Numbas Users
Hey All,

I have noticed some interesting behavior on one of my questions. I have an expression of the form:

ax^2 + bx + c

Where a, b, and c are randomly generated. When the question appears in a quiz, it has about 10% chance or so as being rewritten as 

bx + ax^2 + c

I can't seem to figure out why this random reordering of terms is occurring.


Thoughts?

Heber

Ben Brawn

unread,
Nov 10, 2025, 3:08:08 AM (13 days ago) Nov 10
to numbas...@googlegroups.com
Change it to  $\simplify[canonicalorder]{{a}x^2+{b}x+{c}}$ and it will always have the higher powers first like you want. In your version, it changes the order when the quadratic term's coefficient is negative. 

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/numbas-users/57e5734c-faf8-43f8-875b-8a84bc74bb1en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages