Decimal Representation of Rational and Irrational Numbers

Decimal Representation of Rational and Irrational Numbers
Loading the math board and drawing, please wait…
2019-02-09 18:49
This applet demonstrates the decimal representation of rational and irrational numbers to help students understand the difference between them. Key mathematical concepts include the definitions and decimal representations of rational and irrational numbers. It utilizes GeoGebra commands such as Denominator, Factors, Length, Sequence, If, GCD, Element, SelectedIndex, Textfield, etc. Suitable for middle school and above students.

GeoGebra Commands & Parameters

  1. Denominator(h) → denom_h
  2. Factors(denom_h) → m2
  3. Length(m2) → length_{m2}
  4. Sequence(Element[m2, i, 1], i, 1, length_{m2}) → denomfactorslist
  5. If(Defined[IndexOf[5, denomfactorslist]], IndexOf[5, denomfactorslist], 0) → fiveindexnum
  6. If(Defined[IndexOf[2, denomfactorslist]], IndexOf[2, denomfactorslist], 0) → twoindexnum
  7. GCD(p, q) → commonfactor
  8. Factors(q / commonfactor) → m1
  9. Element(m1, 2, 1) → pf2
  10. Element(m1, 1, 1) → pf1
  11. Length(m1) → e_{length}
  12. SelectedIndex(listChoiceNumber) → f
  13. If(f ≟ 1, If[terminatingDec, textRationalNumTerminating, textRationalNum], textIrrationalNum) → textNumShow
  14. Textfield(p) → InputBox1
  15. Textfield(q) → InputBox2
  16. TextToUnicode(textNumShow) → l01
  17. Length(l01) → b
  18. Textfield(textInputIrrational) → InputBox3
  19. Take(textNumShow, IndexOf[".", textNumShow] + 1) → text2
  20. Sequence("\textcolor{" + ((Element[colors, FromBase[UnicodeToLetter[Element[l01, k]], 10]] * "}{")) + (UnicodeToLetter[Element[l01, k]]) + "}", k, 3, dp + 3) → l4
  21. Sequence(Take[text2, 1 + (n * k), Min[n + (n * k), Length[text2]]], k, 0, Div[Length[text2], n]) → l1
  22. Sequence(Take[l1, 1 + (c * k), Min[c + (c * k), Length[l1] - 1]], k, 0, Div[Length[l1] - 1, c]) → l2
  23. Sequence(Take[l4, 1 + (n * k), Min[n + (n * k), Length[l4]]], k, 0, Div[Length[l4], n]) → l5
  24. Sequence(Take[l5, 1 + k, Min[1 + k, Length[l5] - 1]], k, 0, Div[Length[l5] - 1, 1]) → l6
  25. Length(l6) → lengthI6
  26. If(length_{m2} ≟ 1 ∧ twoindexnum + fiveindexnum ≟ 1 ∨ length_{m2} ≟ 2 ∧ twoindexnum + fiveindexnum ≟ 3 ∨ denom_h ≟ 1, true, false) → terminateDec2