Difference between revisions of "SurdText Command"

From GeoGebra Manual
Jump to: navigation, search
Line 2: Line 2:
 
{{command|text}}
 
{{command|text}}
 
;SurdText[ <Number> ]
 
;SurdText[ <Number> ]
:Creates text representation of the number in the form <math>\frac{a+\sqrt{b}}{c}</math>.
+
:Creates text representation of the number in the form <math>\frac{a+\sqrt{b}}{c}</math> or as a multiple of <math> \pi </math>
:{{example|1=<code>SurdText[e]</code> creates  '' <math>\frac{2\sqrt{37\sqrt{2}-32}+3\sqrt{2}-2}{10\sqrt{2}-10}</math>''}}
+
:{{example|1=<code>SurdText[2.414213562373095]</code> creates  '' <math>\sqrt{2} + 1</math>''}}
 +
:{{example|1=<code>SurdText[4.71238898038469]</code> creates  '' <math> \frac{3 \pi}{2}</math>''}}
 +
;SurdText[ <Number>, <List> ]
 +
:Creates text representation of the number as multiples of the constants in the list. If the list is empty it uses a list of common constants.
 +
:{{example|1=<code>SurdText[3.718281828459045, {exp(1)}]</code> creates  '' <math>e + 1</math>''}}
 +
:{{example|1=<code>SurdText[5.382332347441762, {sqrt(2), sqrt(3), sqrt(5)}]</code> creates  ''<math> \sqrt{2} + \sqrt{3} + \sqrt{5}</math>''}}
 +
:{{example|1=<code>SurdText[1.693147180559945, {}]</code> creates  ''<math> 1 + \ln{2}</math>''}}
 
;SurdText[ <Point> ]
 
;SurdText[ <Point> ]
 
:Creates text representation of the point, where coordinates are in the form <math>\frac{a+\sqrt{b}}{c}</math>.
 
:Creates text representation of the point, where coordinates are in the form <math>\frac{a+\sqrt{b}}{c}</math>.

Revision as of 22:00, 15 July 2012


SurdText[ <Number> ]
Creates text representation of the number in the form \frac{a+\sqrt{b}}{c} or as a multiple of \pi
Example: SurdText[2.414213562373095] creates \sqrt{2} + 1
Example: SurdText[4.71238898038469] creates \frac{3 \pi}{2}
SurdText[ <Number>, <List> ]
Creates text representation of the number as multiples of the constants in the list. If the list is empty it uses a list of common constants.
Example: SurdText[3.718281828459045, {exp(1)}] creates e + 1
Example: SurdText[5.382332347441762, {sqrt(2), sqrt(3), sqrt(5)}] creates \sqrt{2} + \sqrt{3} + \sqrt{5}
Example: SurdText[1.693147180559945, {}] creates 1 + \ln{2}
SurdText[ <Point> ]
Creates text representation of the point, where coordinates are in the form \frac{a+\sqrt{b}}{c}.
© 2021 International GeoGebra Institute