HP Forums
HAngle in FW 7820 - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: HAngle in FW 7820 (/thread-4154.html)

Pages: 1 2


HAngle in FW 7820 - salvomic - 06-14-2015 10:39 PM

hi,
I'm trying a program by Eddie (Solar, here) but my Prime doesn't execute the line
HAngle:= 1;

What's about?

Salvo


RE: HAngle in FW 7820 - kharpster - 06-15-2015 02:16 AM

The "command' executes on the command line. Are you running the program in Home mode? The help text defines the variable as a Home Setting Variable.


RE: HAngle in FW 7820 - salvomic - 06-15-2015 07:37 AM

(06-15-2015 02:16 AM)kharpster Wrote:  The "command' executes on the command line. Are you running the program in Home mode? The help text defines the variable as a Home Setting Variable.

I'm trying in CAS and in Home, same result...
I'm using the example in the blog of Eddie: if I change first the angle mode manually it returns the same numbers, otherwise no.

Salvo


RE: HAngle in FW 7820 - DrD - 06-15-2015 07:51 AM

There are some conflicting descriptions in the User Guide for HAngle settings. Some places state HAngle:=0 sets degree mode, and other places have it as setting radian mode.

The help description has it right:

:=0 for Radians (default)
:=1 for Degrees

(Programmatically; or via the command line, when in HOME view.)


RE: HAngle in FW 7820 - salvomic - 06-15-2015 07:56 AM

(06-15-2015 07:51 AM)DrD Wrote:  There are some conflicting descriptions in the User Guide for HAngle settings. Some places state HAngle:=0 sets degree mode, and other places have it as setting radian mode.

The help description has it right:

:=0 for Radians (default)
:=1 for Degrees

(Programmatically or via the command line, when in HOME view.)

in fact...
However HAngle:=0 in CAS gives error, :=1 no, but doesn't change (also in Home), here...
Maybe a setting wrong by me?

Salvo


RE: HAngle in FW 7820 - DrD - 06-15-2015 08:03 AM

In HOME view (via command line):

HAngle:=0; // results in a green "∡π" display in upper right corner of display
HAngle:=1; // results in a green "∡°" display in upper right corner of display


RE: HAngle in FW 7820 - salvomic - 06-15-2015 08:05 AM

(06-15-2015 08:03 AM)DrD Wrote:  In HOME view (via command line):

HAngle:=0; // results in a green "∡π" display in upper right corner of display
HAngle:=1; // results in a green "∡°" display in upper right corner of display

not by me: only the "π" symbol...

but... found a thing!
I wa in "Statistic 1 var": it depends on Application...
With "Function" activated it works.


RE: HAngle in FW 7820 - DrD - 06-15-2015 08:13 AM

If the Title bar shows CAS, HAngle doesn't work, and the spelling of the home var has the first two characters capitalized. If these settings aren't the problem, I have no further idea why it wouldn't work.

It works on my calcs and emulator here, and for revs back to 6975.


RE: HAngle in FW 7820 - DrD - 06-15-2015 08:16 AM

I just checked it on my equipment and it works fine in Statistics 1Var. So your instance is different than what I see here. Is your case repeatable? Is it on the emulator or on the calc or both?


RE: HAngle in FW 7820 - salvomic - 06-15-2015 08:16 AM

(06-15-2015 08:13 AM)DrD Wrote:  If the Title bar shows CAS, HAngle doesn't work, and the spelling of the home var has the first two characters capitalized. If these settings aren't the problem, I have no further idea why it wouldn't work.

It works on my calcs and emulator here, and for revs back to 6975.

yes, it doesn't work in CAS, and do depend by active Application.
Here: if Function is active ok (Home), if Statistic then don't...

EDIT: found!
In Statistic 1 var by me, in Symb setup there was Angle measure set to "Radians"..., now I put it "System" and HAngle seems to work!
Thank you Dale!


RE: HAngle in FW 7820 - DrD - 06-15-2015 08:21 AM

I have checked that on my calc (rev C) and the emulator, and HAngle works as expected.


RE: HAngle in FW 7820 - DrD - 06-15-2015 08:23 AM

Ok, that makes sense, now. It's hard to isolate these things with so many system settings, but necessary, I guess. We need a background program to keep our house in order...hi!


RE: HAngle in FW 7820 - salvomic - 06-15-2015 08:28 AM

(06-15-2015 08:23 AM)DrD Wrote:  It's hard to isolate these things with so many system settings, but necessary, I guess. We need a background program to keep our house in order...hi!

yes, I agree :-)


RE: HAngle in FW 7820 - Joe Horn - 06-15-2015 11:22 AM

If this was already pointed out, forgive the repeat, but the problem is that the VALUES of HAngle and HFormat are different in CAS than they are in Home.

In CAS, HAngle is 0 or 1, but in CAS, it's 1 or 2.
Radian mode: HAngle=0 in Home, 1 in CAS.
Degree mode: HAngle=1 in Home, 2 in CAS.

Similarly, HFormat is 0 through 5, but in CAS, it's 1 through 6.
Standard mode: HFormat=0 in Home, 1 in CAS.
Etc.

HAngle and HFormat are the only system variables that exhibit this buggy offset. They have done this since the beginning of time. The documentation applies only to their Home values, not their CAS values. Beware when writing CAS programs or using them in User-Defined Functions from CAS.


RE: HAngle in FW 7820 - salvomic - 06-15-2015 11:28 AM

(06-15-2015 11:22 AM)Joe Horn Wrote:  ...
HAngle and HFormat are the only system variables that exhibit this buggy offset. They have done this since the beginning of time. The documentation applies only to their Home values, not their CAS values. Beware when writing CAS programs or using them in User-Defined Functions from CAS.

yes Joe, indeed.
However, in my case (a program with that setting) the problem was that (I don't know why) in Statistic 1 var I had the setting for Angle set as "Radiant": putting it "System" now it runs well also in CAS (from the program)...

I hope that offset could be deleted, if it's possible...


RE: HAngle in FW 7820 - compsystems - 06-15-2015 12:39 PM

a flag is needed to change the mode of simplification, none, minimum, máximum

This flag is useful?


RE: HAngle in FW 7820 - Joe Horn - 06-15-2015 03:11 PM

(06-15-2015 12:39 PM)compsystems Wrote:  a flag is needed to change the mode of simplification, none, minimum, máximum

This flag is useful?

YES, making that setting programmable would be VERY useful! Also hugely useful would be a programmable flag for the "Change apparent integers into exact integers" CAS setting, which currently makes some CAS functions fail in Home programs when it's turned off. It's annoying to have to check that setting manually, when programs should be able to take care of it automatically.

In general, ALL user-settable options should be programmable. Seems relatively intuitively obvious, no?


RE: HAngle in FW 7820 - Digitaldreams - 06-16-2015 08:48 AM

Forgive my ignorance but wouldn't AAngle be a better option ?, works for me in 7820.

Regards


RE: HAngle in FW 7820 - Joe Horn - 06-16-2015 02:03 PM

(06-16-2015 08:48 AM)Digitaldreams Wrote:  Forgive my ignorance but wouldn't AAngle be a better option ?, works for me in 7820.

I think you're right. AAngle always trumps HAngle, so programs should (a) save AAngle in a temp var, (b) set AAngle as needed, then (c) restore it from the temp var before exiting. That way the program will handle angles as intended, and the user's current app setting will be respected. HAngle can be ignored.


RE: HAngle in FW 7820 - DrD - 06-16-2015 03:07 PM

Help says:

If AAngle ==0, then use Home View Setting (HAngle can be either 0 or 1, controlling the radian/degree mode).

IF AAngle ==1, then in the specific App in view, the angle mode is radian.

If AAngle == 2, then in the specific App in view, the angle mode is degree.

-Dale-