Math Type and Repeating Decimals

Hello Desmos Computation Layer Forum,

Does anybody know if there is key stroke to add a bar over a repeating decimal? I can do it in LaTeX, but my students when entering answers in a Math Input or Text Input cannot use LaTeX.

Thanks,
Richard

Maybe others have a workaround for math input components, but this strategy works for text input.
gif

3 Likes

The students are working in a table. They need to fill in the decimal equivalent of a fraction. I was hoping that since tables evaluate expressions, it would use something like 0.\overline3 or 0.\overline{3}, but it does not take a latex input and evaluate or write it in math type.

Follow up question:
I want my students to label β€œ%” on their answers, but when they type 10% it only lets them do β€œ10% of”. Is there a solution to this I am missing?

Thanks Again,
Richard

Hey Richard!

That’s something we’re currently looking to improve, but in the meantime you can use a suffix or a cell suffix to provide it for them

Thanks Jay,
I have resorted to the suffix.

Richard

Follow up question.
I am trying to get my CL to recognize that this.cellContent is a character string, np.

Here is my CL. The problem starts happening in the d2 variable section that I annotated.

#function h adds 3 numbers
#function e evaluates a fraction

h=simpleFunction("\r+y+b",β€œr”,β€œy”,β€œb”)
e=simpleFunction("\m\div n",β€œm”,β€œn”)

d=h.evaluateAt(this.cellNumericValue(1,2),this.cellNumericValue(1,3),this.cellNumericValue(1,4))
k=e.evaluateAt(this.cellNumericValue(1,2),d)
i=e.evaluateAt(2,7)
cellContent(1,5): when isUndefined(this.cellNumericValue(1,2)) or isUndefined(this.cellNumericValue(1,3)) or isUndefined(this.cellNumericValue(1,4)) β€œβ€ when k=i β€œ:white_check_mark:” otherwise β€œ:x:”

d1=h.evaluateAt(this.cellNumericValue(2,2),this.cellNumericValue(2,3),this.cellNumericValue(2,4))
k1=e.evaluateAt(this.cellNumericValue(2,2),d1)
i1=e.evaluateAt(5,7)
cellContent(2,5): when isUndefined(this.cellNumericValue(2,2)) or isUndefined(this.cellNumericValue(2,3)) or isUndefined(this.cellNumericValue(2,4)) β€œβ€ when k1=i1 β€œ:white_check_mark:” otherwise β€œ:x:”

#add 3 values in row 3 of table53
d2=h.evaluateAt(this.cellNumericValue(3,2),this.cellNumericValue(3,3),this.cellNumericValue(3,4))
#evaluate a fraction
k2=e.evaluateAt(this.cellNumericValue(3,2),d2)
#evaluate the fraction 8/7
i2=e.evaluateAt(8,7)
#define some variables
a=this.cellContent(3,2)
b=this.cellContent(3,3)
c=this.cellContent(3,4)
#sets a value for a1 if all cells say β€œnp”
a1= when this.script.a=β€œnp” and this.script.b=β€œnp” and this.script.c=β€œnp” 1 otherwise 0
#if all cells say β€œnp” cell(3,5) should have a green checkmark
cellContent(3,5): when isUndefined(this.cellNumericValue(3,2)) or isUndefined(this.cellNumericValue(3,3)) or isUndefined(this.cellNumericValue(3,4)) β€œβ€ when k2=i2 β€œnegative fish, np” when a1=1 β€œ:white_check_mark:” otherwise β€œ:x:”

d3=h.evaluateAt(this.cellNumericValue(4,2),this.cellNumericValue(4,3),this.cellNumericValue(4,4))
k3=e.evaluateAt(this.cellNumericValue(4,2),d3)
i3=e.evaluateAt(7,7)
cellContent(4,5): when isUndefined(this.cellNumericValue(4,2)) or isUndefined(this.cellNumericValue(4,3)) or isUndefined(this.cellNumericValue(4,4)) β€œβ€ when k3=i3 β€œ:white_check_mark:” otherwise β€œ:x:”
Richard

If there are variables being typed into the cell, it will always return as undefined. You could try changing the beginning part of the cellContent to this.

cellContent(3,5): when isBlank(this.cellContent(3,2)) or isBlank(this.cellContent(3,3)) or isBlank(this.cellContent(3,4))

Thanks cwinske,

That fixed the problem!!!
I guess the next question is what is the difference between using isBlank and using isUndefined?

Thanks Again,
Richard

It turns out that if you create the repeating decimal as you did in the text input, you can then copy/paste the result in a math input and it will show as a barred number. I’m not sure how to test if it is actually a barred value.

Thank you. this helps a lot!