-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Archived Topics
- Tablets and Mobile Devices Archive
- HP Prime Polar Mode

Create an account on the HP Community to personalize your profile and ask a question

10-23-2015 05:44 PM
Tim-
Thank you for showing how to enter polar complexes using numerals.
But I'm still puzzled when, in PPL--not home--I set out to combine two scalar VARIABLES into a polar complex. Here's what I would expect is possible, but it results in a syntax error:
EXPORT TestPolar()
BEGIN
LOCAL A,B,Z;
A:=1;
B:=45;
Z:=(A,∡B); // <----Syntax error here.
RETURN(Z);
END;
So, the only thing I can do is a workaround using rectangular_coordinates(), or similarly using A*SIN(B) and A*COS(B):
EXPORT TestPolar2()
BEGIN
LOCAL A,B,Z1,Z2;
A:=1;
B:=45;
Z1:=rectangular_coordinates(A,B);
Z2:=(Z1(1),Z1(2));
RETURN(Z2);
END;
So, it seems, there is no direct way in PPL to create a polar complex the way one can a rectangular complex. Is that the right conclusion?
Thanks,
Doug
10-24-2015 01:41 PM
Hi!, dorbitbrown:
You can, other's program. See, this link ... http://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/archv021.cgi?read=254617
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
10-24-2015 05:05 PM
Maké-
Thanks for the HP museum link. I had seen it before, and it does not answer the question for two reasons.
First, most simply, in the final message, the OP resorts to using rectangular_coordinates() and polar_coordinates() because there is no solution.
Second, in post #1, the OP's approach does not actually do what he wants, because the line
CTOT:=(CRP,CIP);
does not work the way he thinks in the program Rect_to_Polar(). For example, if you try:
Rect_to_Polar(1,1)
the result is
1.41421356237+45*i
Which is actually
45.022216738∡88.1999598175
NOT the correct answer of
1.41421356237∡45
So, it seems, there is still no direct way in PPL to create a polar complex the way one can a rectangular complex. Do you agree that the right conclusion?
Thanks,
Doug
10-24-2015 07:58 PM - edited 10-24-2015 08:02 PM
Hi!, dorbitbrown:
You should set, as ...
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
10-25-2015 07:46 AM - edited 10-25-2015 09:50 AM
Hi!, dorbitbrown:
Ok. Your must configure, as ...
In Home (Shift Settings)
Angle Measure : Degrees
Number Format : Fixed 4
Complex : (a,b) checked.
Now, press Tool Box key. Then, press User. In Program Funcion, select Rect_to_Polar.
In Cas or Home, you must see ...
Rect_to_Polar(1.0000,1.0000)
If press Enter, you see ... (1.4142,45.0000)
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
10-25-2015 09:54 AM - edited 10-25-2015 09:56 AM
I see what you are having issues with. Does appear to be the correct conclusion for the moment. I'll would not have expected that to be the case and I will see what can be done...
I think this may be tied in with the way the parser/evaluator works though, so it might not be an easy adjustment/fix.
Although I work for the HP calculator group as a head developer of the HP Prime, the views and opinions I post here are my own.
10-25-2015 04:59 PM
Make-
Thank you for joining me in working on this tricky problem.
Please try taking ARG() of your result; you will be surprised to see that it is 88.2 degrees, NOT the 45 degrees you expected!! However, to get 45, you could take IM() of your result, which is an important clue to what is going on.
Here is what has happened: when you switched the complex display from a+b*i to (A,B), it stopped displaying the "i", and so you were fooled into thinking that the number 45 represents degrees. Actually, it represents the magnitude of the imaginary part of the complex number 1.4142+45.0000*i . Another experiment you can try is this: with complex mode set to (A,B) enter (1∡45) and notice that it will be represented as (1∡45), and NOT as (1,45).
Thanks,
Doug
10-25-2015 05:12 PM
Tim
Thank you very much for looking into this and recognizing what's going on. I'll be interested to learn what you find out. In the meantime, I'll use a workaround.
On a related topic (see my latest reply to Make's post for the motivation), would you happen to know if there is a user-accessible Settings variable that controls complex number display format? HComplex controls the checkbox allowing complex results from real inputs, but I can't find anything to control the choice of " a+b*i" versus "(a,b)" format. Hopefully I just overlooked it.
Thanks again,
Doug
10-26-2015 08:12 AM - edited 10-26-2015 05:58 PM
Hi!, dorbitbrown:
Ok. If you consider, that this result, is not adequate, use directly, the values of theory, indicated ...
Where ...
r = sqrt(x^2+y^2); theta = atan(y,x)
Too ...
-19*e^i*pi Enter [angle] --> (59.6093 angle -122.7042)
(1,1) Enter [angle] --> (1.4142 angle 45.0000)
Have a nice day !.
@Maké (Technical Advisor Premium - HP Program Top Contributor).
Provost in HP Spanish Public Forum ... https://h30467.www3.hp.com/
