Does the 49 have a rectangular to polar conversion command? Or do you
convert to polar by going to mode and setting it to polar? Is there a
shortcut to do this?
This newsgroup is great - it sure makes up for the terrible 49
documentation. Thanks.
Chris
LS PRG, NXT, MODES
Or
<< 65 MENU >>
Hope this helps.
Doug
"Chris Briskorn" <chris.b...@worldnet.att.net> wrote in message
news:_DJu9.7930$VJ5.4...@bgtnsc05-news.ops.worldnet.att.net...
The absence of this conversion haunted me because the process was two
quick keystrokes on the 48S.
So I wrote a little program to toggle between rectangular and polar
complex display. Because it was short and easy to write, 'tRP' became
it's name.
<< -16 IF FS? THEN -16 CF ELSE -16 SF END >>
This single softkey 'tRP' toggles the display between Rectangular and
Polar representation. Easy enough to create........and remember.
If you have not set the angle mode to spherical it will work.
This is shorter:
<< -16 DUP FS? :: CF :: SF IFTE >>
> Does the 49 have a rectangular to polar conversion command?
> Or do you convert to polar by going to [the mode menu]
> and setting it to polar?
In your case, what you are asking for is a way to simply input
rectangular coordinates and see the result in polar form.
You've already seen how to do that, by simply doing one
CYLIN or SPHERE command to instruct the screen painter
to show all complex numbers in polar format, then every time
you enter a complex number in (x y) form, it automaticaly
appears in polar form on the display, voila!
Other people ask why there are no P<->R "conversion commands"
in the HP48/49 calculator series, thinking that HP somehow goofed
by leaving out commands that used to be found in old calculators.
The answer to this latter gripe is that all such "conversions"
are automatically built-in; whenever you enter a related pair
of input values which are polar coordinates to begin with,
you just type an angle symbol \<) between them,
and the calculator automatically converts to an internal object
having the proper internal coordinates.
Conversely, whenever an internal object is displayed,
there is an automatic "conversion," if necessary,
to the display format in which you want to see it,
which you can choose via a command (RECT, CYLIN, or SPHERE);
when you type a new display command, everything shown
in the display changes to the desired display format
(and keeps displaying that same way),
although the internal object itself never changes at all.
Note that input conversion, if any, is determined solely by syntax
(the presence or absence of an angle symbol before each value
which represents an angle), while output display conversion
is determined independently by commands
which set a persistent choice of display style.
Therefore, to "convert coordinates," as you requested,
you merely enter data in the syntax appropriate to its type
(with or without angle symbols), and let the same data
be redisplayed automatically in the desired output style.
If you don't very often use the "infinity function" above
the "zero" key on the 49G, you can make it a more convenient
"angle symbol" key instead, by performing 128 CHR 102.2 ASN
just once to set it up (be sure also to turn on USER mode);
the HP48, of course, already had this character on its keyboard,
right next to pi.
The older calculators had P<->R "conversion commands,"
each requiring two separate input values and returning
two separate output values, because in the first place
their "registers" (including stack registers) each
held only one fixed-size kind of object (real number),
and in addition, because there was no parser/compiler
to read typed text and automatically build composite
internal objects, nor was there any decompiler/displayer
to interpret composite internal objects
and automatically display them in various formats.
If you really want pairs of separate input and output
values to be converted, however, exactly like the old
P<->R commands, these HP48/49 commands are of use:
V-> splits an object (complex, 2D vector, or 3D vector)
into the separate component values which would be displayed
in the current display mode (RECT, CYLIN, or SPHERE);
for the latter two modes, this is just like an R->P command.
Conversely, ->V2 and ->V3 take two or three separate stack values
and build from them a single internal object (set flag -19 for
->V2 to create complex numbers, otherwise it creates vectors),
interpreting the coordinates according to those same display modes;
for the latter modes, again, this is just like a P->R command.
To make the good old original P<->R commands out of these,
where each command takes two separate input values
and returns two separate output values to the stack:
P->R: \<< -16. SF \->V2 -16. CF V\-> \>>
R->P: \<< -16. CF \->V2 -16. SF V\-> \>>
To preserve the original flag state, if desired,
insert RCLF UNROT at the beginning and ROT STOF at end
(on the HP48 use ROT ROT in place of UNROT).
Other commonly requested simple functions:
RAD angle mode toggle (already provided on 48G keyboards):
\<< -17. DUP IF FS? THEN CF ELSE SF END \>>
POLAR display mode toggle (already provided on 48G keyboards):
\<< -16. DUP IF FS? THEN CF ELSE SF END \>>
You can name these whatever you'd like (except RAD and POLAR,
which are already built-in command names for something else :)
and then assign those quoted names to any keyboard locations,
or just type their names to invoke them.
Oh dear, it looks as if this isn't the first time
that this same topic has come up; maybe next time
I'll remember, and stop answering this same question again :)
http://groups.google.com/groups?selm=3D9972A6.89F3CFB6%40miu.edu
[r->] [OFF]
.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----