This applet may be used by the teacher in class to show students the decimal representation of rational numbers and irrational numbers.
Students can also explore these numbers on their own. Teachers may design their own worksheets to assist the students in their exploration/investigation.
ACKNOWLEDGEMENTS :
This applet originated from my request for help on the forum.
https://help.geogebra.org/topic/algorithm-for-rounding-to-n-decimal-places
Numerous people helped. Michael, Noel Lambert, Simona, Loco, chaffeur all offered ideas and samples. I am indebted to all of them.
See similar applets by Michael Borcherds at
https://www.geogebra.org/m/UipIJcvQ
and Noel Lambert at
https://www.geogebra.org/m/vjgrefga
Updated on 19 Feb 2020 to correct display for terminating decimals and decimals greater than 1.
Updated 11 Feb 2021 to add cases where p = 4/5 and q = 2, which wrongly display excess 0s when result is supposed to be terminating decimal. Also included display of input fractions reduced to lowest terms where needed.