Difference between revisions of "SurdText Command"
From GeoGebra Manual
Line 4: | Line 4: | ||
:Creates text representation of the number in the form <math>\frac{a+b\sqrt{c}}{d}</math> | :Creates text representation of the number in the form <math>\frac{a+b\sqrt{c}}{d}</math> | ||
:{{example|1=<code>SurdText[2.414213562373095]</code> creates '' <math>\sqrt{2} + 1</math>''}} | :{{example|1=<code>SurdText[2.414213562373095]</code> creates '' <math>\sqrt{2} + 1</math>''}} | ||
+ | :{{example|1=<code>SurdText[ 2.439230484541326 ]</code> creates '' <math>\frac{7+3 \sqrt{3}}{5}</math> '' }} | ||
+ | |||
;SurdText[ <Number>, <List> ] | ;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. | :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[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{5} + \sqrt{3} + \sqrt{2}</math>''}} | :{{example|1=<code>SurdText[5.382332347441762, {sqrt(2), sqrt(3), sqrt(5)}]</code> creates ''<math> \sqrt{5} + \sqrt{3} + \sqrt{2}</math>''}} | ||
− | :{{example|1=<code>SurdText[1.693147180559945, {ln(2)}]</code> creates ''<math> | + | :{{example|1=<code>SurdText[1.693147180559945, {ln(2)}]</code> creates ''<math> \ln{2} + 1</math>''}} |
;SurdText[ <Point> ] | ;SurdText[ <Point> ] | ||
:Creates text representation of the point, where coordinates are in the form <math>\frac{a+b\sqrt{c}}{d}</math>. | :Creates text representation of the point, where coordinates are in the form <math>\frac{a+b\sqrt{c}}{d}</math>. | ||
− | {{Note|1=Because this command works with a rounded decimal number as the input, sometimes the result will be unexpected | + | {{Note|1=Because this command works with a rounded decimal number as the input, sometimes the result will be unexpected.}} |
{{Note|1=If a suitable answer can't be found, the number will be returned. For example <code>SurdText[1.23456789012345]</code>.}} | {{Note|1=If a suitable answer can't be found, the number will be returned. For example <code>SurdText[1.23456789012345]</code>.}} |
Revision as of 09:46, 14 September 2012
This page is about a feature that is supported only in GeoGebra 4.2. |
- SurdText[ <Number> ]
- Creates text representation of the number in the form \frac{a+b\sqrt{c}}{d}
- Example:
SurdText[2.414213562373095]
creates \sqrt{2} + 1
- Example:
SurdText[ 2.439230484541326 ]
creates \frac{7+3 \sqrt{3}}{5}
- 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{5} + \sqrt{3} + \sqrt{2}
- Example:
SurdText[1.693147180559945, {ln(2)}]
creates \ln{2} + 1
- SurdText[ <Point> ]
- Creates text representation of the point, where coordinates are in the form \frac{a+b\sqrt{c}}{d}.
Note: Because this command works with a rounded decimal number as the input, sometimes the result will be unexpected.
Note: If a suitable answer can't be found, the number will be returned. For example
SurdText[1.23456789012345]
.