How many decimal places to display?

I went back and forth on whether this belonged under Support or Discussion. How does Doenet decide how many decimal places to display in a problem when the author doesn’t specify? In this problem specifically, for example. Doenet

It took me quite a while to figure out why 1 or 2 students out of 20 were being marked wrong on Part b while everyone else was being marked correct. If you choose version k from that link, you can see this in action also. The issue is that Doenet displayed two digits 1.85 for the value of the derivative when the actual value was 1.85396, and in this random version, the difference in time in this version was large enough (3.5) that the product .00396*3.5 put the error outside the .01 allowed. But I don’t see where the problem as authored told Doenet to only display 2 digits in the first place?

I know I can fix it by increasing the allowed error, or forcing Doenet to display more digits, or by changing the expected answer to use a value rounded to 2 decimal places, but it feels like there’s a larger issue for me to figure out here.

Allowed error is tricky - I usually want students to have a little leeway in rounding, but not so much that they’re being called correct when they are doing incorrect calculations. I have seen students get very confused when a formula is called correct and then plugging a number into the formula correctly is called incorrect. Or when plugging in 2 different numbers into a formula and one is called correct and one isn’t. When that happens, students think there’s something wrong with the problem instead of realizing that there was actually something wrong with an answer that was marked correct.

More general error thoughts/questions: Matt seems to have preferred using .01 absolute error when authoring problems; WeBWorK’s default is something like .01%, Edfinity’s might be more like 2%. But I’m certain WeBWorK would have displayed more like 5 or 6 digits at a minimum, maybe even 8 or 9. I can see how might make more sense to ask problem authors to specify how numbers will be displayed and also how much error to allow. However, I think it’s pretty unusual, and Matt never wrote WeBWorK and doesn’t seem to have found it intuitive either based on how he wrote his problems.

I decided to put this under Discussion because I know how to fix the exercise. But I don’t know if there’s things I should know, and I wanted to learn about decimal places shown by default and other thoughts on allowed error best practices.

Chrissy

In DoenetML, the default display rounding for everything but math inputs is displayDecimals="2" displayDigits="3", meaning the number displayed will be rounded to two digits to the right of the decimals or three significant digits, whichever is higher precision. The result is numbers that display as 425234.09 or 0.00000285. displaySmallAsZero also defaults to 10^(-14), so numbers less than that in absolute value display as simply 0.

For math inputs, we thought that it might be weird if students typed something and it was rounded when they hit enter. So numbers from math inputs default with displayDecimals="2" displayDigits="10", meaning the result will have 10 significant digits or 2 decimal places, whichever is higher precision. And displaySmallAsZero is set to 0, so small non-zero numbers are not displayed as 0.

I don’t have any particular wisdom in best practices for rounding in answer validation. I’ve found it a challenge address all the ways students can get confused by idiosyncrasies of rounding. It’s especially difficult when one has multi-step problems where you ask for verification at each step. Due to how rounding errors propagate, I don’t know of a way to make it so that the rounding acceptance threshold of sub-answers corresponds to the rounding acceptance threshold of the final answer. I tell students to enter answer with significantly more precision than the problem dictates: “if it says you need at least 3 digits, then calculate it to at least 6 digits and enter all 6 digits in your answer.”

Does anyone have wisdom on this issue?

Thank you, this helps.

I fully agree! But then I’m at a bit of a loss with reconciling that with the default behavior of displaying only 2 places after the decimal. :upside_down_face:

I understand that’s been the behavior, but I would like to argue that it shouldn’t be. I think most authors would expect to see the actual numbers displayed, or at least 4 or 5 places after the decimal point, possibly 8 or 9. Desmos often displays 5, and there are times when even that is not enough.

I’m sure there were good reasons for the choice. Maybe that’s all algebra or precalculus wants to see by default? Or for problems that deal with money? But I am pretty surprised by it for calculus, and I don’t think I’ll be the only one. Maybe there could be a problem-wide element to minimize authors having to do change the display to their preferred precision on every number or calculation?

Chrissy