# 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.

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.

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

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 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 “” otherwise “

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 “” otherwise “

#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 “” otherwise “

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 “” otherwise “
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.