HP Forums

Full Version: Inconsistent Deg/Rad in CAS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Because CAS mode does not have the nifty shortcut of changing between rect/polar/complex display like Home does with(shift x) I had been using the ARG() function to get the polar degree number. However, even with degrees set, it sometimes displays in degrees and sometimes in radians. Irritating when working with phasors not to know which it is going to spit out.

For example:
ARG(3 + 3*i) = 45.
ARG(3. + 3*i) = 45.
ARG(3 + 3.*i) = 0.785398163397
I recently did a hard reset on HP Prime emulator.
Trying your examples, with degree setting, it all work perfectly.
Thanks for your reply. Were you testing in CAS mode? ARG() always works correctly for me in Home mode.

I tried reset of the PC emulator, an actual V1 prime, and the Android paid app - which all do the same thing in degree setting when in CAS mode displaying degrees in the top right and typing in:

ARG(3 + 3.00 * i) gets 0.79
ARG(3 + 3 * i) gets 45.00
ARG(3/_45) gets 0.79 where /_ is the angle sign -> shift x
Hi, GregP

Yes, I tested in CAS side. HP Prime emulator build 2.1.14181 (2018 10 16)

With degree setting, ARG(3+3.*i), ARG(3+3*i), ARG(3∡45) all give back 45.

Have you also tried using polar() ?


I would have guessed ARG(z) always return radians, regardless of angle settings.
Somehow, having it return degrees looks weird to me.

BTW, XCas (1.5.0-63 win32) in degree settings, we also have this issue.

XCAS> arg(3+4*i) → 53.1301023542
XCAS> arg(3+4.*i) → 0.927295218002
XCAS> polar(3+4i) → (5, 53.1301023542)
XCAS> polar(3+4.i) → (5.0, 0.927295218002)

Lucky for me, I don't use degree settings Big Grin
Thank you.

I was using build 2.1.14425 (2020 1 16). It appears that the older version probably worked correctly. rolinychupetin on youtube (Canadian professor of electrical engineering) has youtube videos on using the HP Prime for complex numbers and systems of equations where it also appears to work properly in 2017. For instance https://www.youtube.com/watch?v=NUGfqiLOelc

In electrical engineering conventions for use of phasors in AC circuits going all the way back to Steinmetz and his buddy Einstein, oftentimes AC frequencies in radians are mixed with phase offsets in degrees - weird but very common.
Downgraded to Build 2018 7.6 Rev 13865 in the emulator. Just have to find a way to downgrade V1 and V2 of the actual calculator.

This fixed the anomaly with ARG in CAS mode.
ARG(3.+3.*i) gets 45.
Does anyone have a link for build 2.1.14181 (2018 10 16)?
HP seems to have shut down access to their FTP directories some time ago. I am trying to test when the behavior changed and don't have a source for all the versions.
The link to that version of the emulator is


minus the qutoes.
I believe that version is the last one which behaves consistently in CAS when in degree mode and complex numbers are used with ARG().

The only other interesting thing I noticed is that the dedicated complex variables Z0...Zx will truncate any mantissa of the imaginary part if it is zero on entry and then correctly display degrees when ARG() is used.

My understanding of this situation is that CAS mode does not store complex numbers as an object. Doing so (with perhaps a preferred display flag) would make the lives of electrical engineers and EE students a lot easier (as would allowing i to be j - but that second item is easy to fix in CAS by entering j:=(0,1) )
Reference URL's