Roots & Decimals in Text

goldenj shared this question 3 years ago
Answered

I'm making an applet that lets students order a mix of decimals and square roots. I make a list of each, then merge them into a single list. Surdtext[ ] helps write the roots with a radical, but puts the decimals as fractions. So I hit on the idea of using an If[ ] in the text definition,


If[Element[list7, 5] ≟ Element[list7_1, 5], Text[Element[list7, 5]], SurdText[Element[list7, 5]]]


(List 7_1 are the decimal values.)

This works on the desktop, but when I upload the sketch, it's back to fractions.

c2a0cf81be4a2bc0506f59724c2a6ca5

Desktop ^

7a203bd71c64b884f5acf5d7cee94e75

geogebra.org ^ https://www.geogebra.org/m/zstKKkhG


Any ideas on what"s the problem or how to resolve it?


Thanks, in anticipation of brilliant and kind help.


-John

Comments (5)

photo
1

does this help?

Files: foro.ggb
photo
1

Thank you, but my values are being randomly generated to make new problem sets - I can't just type them into a list. I'm wondering why Text[ ] works differently online and desktop - and which is the aberration!

photo
1

I asked only if it could help for the text

https://www.geogebra.org/m/K9t8JvbJ

photo
1

Ah! I didn't know how to do that. Verrry nice routine for making the numbers. Good help!


I discovered with mine that clicking the new values button made the text command show decimals, so I just added a runclickscript command on startup to do that.

photo
1

I just checked the file and the problem is that if you run UpdateConstruction (or press F9 in desktop...), the list list7_1 is updated but not the list7 so the construction becomes inconsistent (you apply SurdText on numbers that don't contain sqrt). When you reload a file (or open it online after upload) the construction is updated the same way.

© 2021 International GeoGebra Institute