maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
142 stars 149 forks source link

Three little bugs with zero #1220

Closed Mat-Ge closed 4 months ago

Mat-Ge commented 4 months ago

All with simp=false. x-0; should return x-0 but the output is x+0 x-0.0; should return x-0.0 but the output is x+-0.0 x*-0.0; should return x(-0.0) but the output is x-0.0

These three problems only occur with zero. For all other numbers the output seems to be as expected.

sangwinc commented 4 months ago

Thanks for reporting this @Mat-Ge. I think I have a fix, which I'm just testing. A little tedious, but good to get this fixed!