HP Forums
Easy Bugs - 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: Easy Bugs (/thread-2294.html)



Easy Bugs - PANAMATIK - 10-15-2014 05:10 AM

There are different kind of bugs, some are very easy to find and fix, others are not. I try to imagine which bugs of my bug list could be easily fixed by the HP Prime team. Lets start with this:

All functions that contain numbers in their name like acos2asin etc. show wrong help text when the cursor is placed right of the number. In case of acos2asin it shows ASIN. If the cursor is left of the number it shows the correct help text of acos2asin.


RE: Easy Bugs - Tim Wessman - 10-15-2014 05:41 AM

This one is one of those deceptively simple ones.

Right now, it is a very simple checker and I agree it could use some more work. The problem really comes down to that the user's intentions are not clear in many cases when you are trying to match text mixed in with math. Is it matching forward/backwards in priority? Do you go backwards first? If so, how far. What if you go backwards until the first match (like in this case) but there is another better match? How about this case (cursor is at the |)?

2acos2asin(|tan)

Do you step backwards to asin and be done? Should you go back 4 and match, but then continue to go back more and find acos2asin? Why not move forward to tan and match that? It is closer and fewer characters away so why wouldn't tan be the correct one? Or should that whole thing be parsed as 2*acos(2)*asin(tan... ???

Right now, the logic is basically go backwards skipping over ( until it finds a match or hits an invalid name character. If it didn't find anything, move forward to see if there is another match in front of the cursor.


RE: Easy Bugs - Claudio L. - 10-15-2014 03:59 PM

(10-15-2014 05:41 AM)Tim Wessman Wrote:  Right now, the logic is basically go backwards skipping over ( until it finds a match or hits an invalid name character. If it didn't find anything, move forward to see if there is another match in front of the cursor.

I think with minimal changes you could do a "longest match". Keep all your logic the same, but when you find a match, just record the position and length of the match and keep searching. If you find a longer match, record its length and position, otherwise ignore it.
This way, if the user types acos2asin, it will find it instead of just asin regardless of where the cursor is.
Longest match will probably provide a better user experience. On the other hand, it can potentially get slow, versus interrupting the search at first hit.

Just a thought.


RE: Easy Bugs - PANAMATIK - 10-15-2014 09:53 PM

Another 'easy' bug concerns hexagesimal numbers. When I add times or convert hours with ->HMS I expect a result in Hours, Minutes, Seconds. But I get always Degrees, Minutes and Seconds. Any hexagesimal result is shown in Degrees, Minutes, Seconds. There is even a dedicated key for entry of degrees The HP-65 was the first calculator who had the ->D.MS key. The HP-25 had instead an ->H.MS key. Obviously there was no clear preference. Of course they didnt show units.
The Prime now has the HMS() function but shows Degrees. Its has mixed both features.
For an 'easy' fix of this problem, I would suggest to add the new function DMS() which is identical to HMS() but shows the result in degrees, and HMS() should display the result as hours like 12h 59m 59s.
But I dont see an easy way to enter hexagesimal hours without a dedicated new key in addition to the Shift a b/c key


RE: Easy Bugs - PANAMATIK - 10-20-2014 03:08 AM

It is normally more easy to fix a bug which is reproducible by just a few key clicks, compared to other bugs, which appear only in special contexts. I think I found an easy reproducible bug, which shows a total crash:

Enter in Statistics 1Var Symbolic View H1: 'MinVal' Enter, or any other 1Var App Results Variable from the Vars menu, then press Plot. The application crashes, the screen gets dark, and HP Prime will restart. All previously entered statistics Data D0-D9 is lost.

I think this application is very easy to use and has some powerful functions. It is not mentioned in the manual that you can enter for H1-5 also a List Variable L0-L9, which is a good idea. However you can also enter a single number, like 3.14, in this case the frequency is not updated, it is still the number of elements of the previously used List variable. After trying to enter any number into Frequency, I get the error message 'unsufficient data'.

In my opinion 1Var Statistics is a very good statistics implementation for a calculator, it is easy to use and shows all needed values very elegant. I dont have experience with other graphic calculators. So I hope this opinion is correct.

When using Autoscale with Histogramm type, it happened to me that I got the error message 'Only one Y value found' , because H Range was outside of the data range. I needed some time to find out this reason. Couldn't autoscale set H Range automatically? This appears to me more comfortable, if possible.


RE: Easy Bugs - Eddie W. Shore - 10-23-2014 01:39 PM

(10-15-2014 09:53 PM)PANAMATIK Wrote:  Another 'easy' bug concerns hexagesimal numbers. When I add times or convert hours with ->HMS I expect a result in Hours, Minutes, Seconds. But I get always Degrees, Minutes and Seconds. Any hexagesimal result is shown in Degrees, Minutes, Seconds. There is even a dedicated key for entry of degrees The HP-65 was the first calculator who had the ->D.MS key. The HP-25 had instead an ->H.MS key. Obviously there was no clear preference. Of course they didnt show units.
The Prime now has the HMS() function but shows Degrees. Its has mixed both features.
For an 'easy' fix of this problem, I would suggest to add the new function DMS() which is identical to HMS() but shows the result in degrees, and HMS() should display the result as hours like 12h 59m 59s.
But I dont see an easy way to enter hexagesimal hours without a dedicated new key in addition to the Shift a b/c key

This is a good idea, we should also include the inverse functions HMS>H and DMS>D.

Here is a routine I recently programmed for DMS>D:

DMSD(degrees, minutes, seconds)
EXPORT DMSD(D,M,S)
BEGIN
LOCAL t;
IF D==0 THEN
t:=1;
ELSE
t:=SIGN(D);
END;
RETURN (ABS(D)+ABS(M/60)+ABS(S/3600))
*t;
END;


RE: Easy Bugs - Wolfgang - 10-31-2014 05:09 PM

Here is a routine HMS>H:


#pragma mode( separator(.,Wink integer(h32) )
// HMSH(decimal degrees)
EXPORT HMSH(ddeg)
BEGIN
LOCAL H,M,S;
H:=IP(ddeg);
M:=IP(((ddeg-H)*60));
S:=(((ddeg-H)*60)-M)*60;
RETURN H+M/100+S/10000;
END;


RE: Easy Bugs - toml_12953 - 10-31-2014 05:39 PM

(10-31-2014 05:09 PM)Wolfgang Wrote:  Here is a routine HMS>H:


#pragma mode( separator(.,Wink integer(h32) )

I like your happy code! Wink


RE: Easy Bugs - Marcus von Cube - 10-31-2014 08:17 PM

(10-31-2014 05:09 PM)Wolfgang Wrote:  #pragma mode( separator(.,;) integer(h32) )
Just Disable Smilies !


RE: Easy Bugs - Wolfgang - 11-01-2014 04:56 AM

@toml_12953: me2 :-)
@marcus von cube: Danke! Ich hoffe, ich denke das nächste Mal daran! :-)