Closed bgailer closed 1 week ago
I'm really sorry about this. The issue was already fixed here https://github.com/maths/moodle-qtype_stack/blob/dev/stack/maxima/assessment.mac#L510 and will be in the next release. I very much appreciate your code, and I've added in your test cases for good measure.
Hello,
when creating STACK tasks with complex numbers, the simplification always tends to the Cartesian form. I discovered the function
polarform_simp
which really helps a lot for this.In one of the tasks, the
polarform_simp
throws an error ("part: argument must be a non-atomic expression") when using it on a purely imaginary number, wherecabs(%i/2)
is less than one. I tried some other numbers, and it seems the function has problems with r being less than one.Those for example throw an error
and for
{@polarform_simp(1/(2*%pi)*%e^(%i*%pi))@}
the function outputs a different result.I made an attempt to fix this, but I am not sure if this is the way to go (see the attached file). Polarformsimp_new.zip