Difference between revisions of "TI-BASIC:Real Mode"
(Initial automated import) |
(Automated internal link correction) |
||
Line 10: | Line 10: | ||
}} | }} | ||
− | The Real command puts the calculator in real number-only mode. This shouldn't be taken quite literally, as you can still type in ''i'' to get complex numbers, and do operations with them (they will be displayed as in [[TI-BASIC: | + | The Real command puts the calculator in real number-only mode. This shouldn't be taken quite literally, as you can still type in ''i'' to get complex numbers, and do operations with them (they will be displayed as in [[TI-BASIC:A_Bi|A+bi]] mode, in that case). However, any operation done with '''real''' numbers that comes out to a complex result, such as taking the square root of a negative number, will throw a [[TI-BASIC:Errors#nonrealans|ERR:NONREAL ANS]] error. |
There is no real advantage to using Real mode over a+bi mode -- it just adds another error condition that wouldn't be triggered otherwise. However, it is the default setting, and so there's a good chance that the calculator will be in Real mode when someone runs your program. Thus, when using complex numbers implicitly (such as in a quadratic equation solver) you should do something about this. | There is no real advantage to using Real mode over a+bi mode -- it just adds another error condition that wouldn't be triggered otherwise. However, it is the default setting, and so there's a good chance that the calculator will be in Real mode when someone runs your program. Thus, when using complex numbers implicitly (such as in a quadratic equation solver) you should do something about this. | ||
Line 27: | Line 27: | ||
= Related Commands = | = Related Commands = | ||
− | * [[TI-BASIC: | + | * [[TI-BASIC:A_Bi|A+bi]] |
* [[TI-BASIC:Re_Thetai|re^θi]] | * [[TI-BASIC:Re_Thetai|re^θi]] | ||
Latest revision as of 23:21, 24 February 2016
Command Summary
Enables real number only mode.
Command Syntax
Real
Menu Location
While editing a program, press:
- MODE to access the mode menu.
- Use arrows and ENTER to select Real.
TI-83/84/+/SE
1 byte
The Real command puts the calculator in real number-only mode. This shouldn't be taken quite literally, as you can still type in i to get complex numbers, and do operations with them (they will be displayed as in A+bi mode, in that case). However, any operation done with real numbers that comes out to a complex result, such as taking the square root of a negative number, will throw a ERR:NONREAL ANS error.
There is no real advantage to using Real mode over a+bi mode -- it just adds another error condition that wouldn't be triggered otherwise. However, it is the default setting, and so there's a good chance that the calculator will be in Real mode when someone runs your program. Thus, when using complex numbers implicitly (such as in a quadratic equation solver) you should do something about this.
Advanced Uses
Rather than switch to a+bi mode, you might want to force the calculations to use complex numbers by making the original argument complex. The general way to do this is by adding +0i to the number. However, there may be an optimization in any particular case. See the Quadratic_Formula routine for a good example of this.
Real Done √(-1) (causes an error) √(-1+0i) i