Bug in SIMPLIFY? (hp 50g)



#2

I am very surprised by the behavior of SIMPLIFY.
I am in a directory where I have two variables defined:

  • M value 0.1
  • Q value 0.8
(I have some other variables as well).
I type the expression, in the equation writer:
 1 + M - M
-----------
3 + M
I press SIMPLIFY, and I get 1 / (M + 3), which is the expected
answer.
Now, I try with another expression:
 Q * M - (Q - 1)
-----------------
Q * M + 1
I hit SIMPLIFY, and I get... 0.259259259... !!!

Why in one case it simplifies only down to symbols (correctly) while
in the second, it also substitutes values into variables???
I consider the second behavior a bug... can it be prevented? Why is
the behavior inconsistent?
This with ROM C-2.15.

Many thanks,

Luca


#3

Hi again Luca,

Hmmm...When I work your scenario, I get numeric results for both equations. It's only when I purge both M and Q that I get symbolic results.

The only suggestion I could make is to be sure you're not inadvertantly mixing upper and lower case variables (ie, M and m would be two separate variables).

It's pretty much axiomatic that any variables involved must be purged if you don't want them evaluated during operations. Either that or the variables must be put in a directory where the calculator can't reach them (such as in a lower or parallel directory).

Best regards,

hal

#4

I recommend sitting down with the manual and doing a quick read on approx -v- exact mode and the different types of numbers. Imagine "1" is handled differently than "1." Yes, the decimal tells the calculator to handle it as a value and not a number.

For example, on the stack type 1 ENT 2 /
If you are in exact mode, the 50G will return 1/2

If you type 1 ENT 2. /
the 50G will return .5

Once you figure out how to manage your variables, and get solid on the types of values you have stored and where they are, you'll get predictable behavior.

There are several great tutorials available through links here in the forum and at the HP site,

Very respectfully,

David


#5

Thanks...

I don't think the problem is approx vs. exact mode.

The problem is that I think it is a very bad idea that expression simplification involves also substituting into the expression the numerical values of variables, fishing these variables from the directory and its parents in the directory tree.
I think it would have been a much cleaner design to let simplify act on the expression on the stack, and reserve some other function for such substitution.
After all, commands usually work on their argument, not on the argument plus extra information that they go hunting for around in the calculator.

This "bug" (which, to some, may be a feature) prevents me from using the 50g as a full-fledged calculator: either I use it to do symbolic manipulation (in which case I have to be careful not to have numeric variables), or as a numerical calculator (in which case variables are ok).

I may still find a work style that works for me, but I disagree with the design decision on SIMPLIFY.

Luca


#6

I've looked at this and I find it confusing too. I've defined the variables Q and M as you have. An expression containing only one of the two variables (e.g., Q^2+3) is unaffected by SIMPLIFY. However, an expression containing both (e.g., Q^2+3+M) gets converted into a number at once! I do not fully understand the reasoning behind this difference in behaviour. (Neither the "numeric" nor the "approx" mode settings are ticked.)

Of course, there are many "simplification" commands on the HP-50g: EXPAN, EXPAND, SEVAL, plus lots specific to trigonometry, powers, and logarithms. Give me a TI-89 for elementary algebra any day! Less powerful, no doubt, but it does what is expected.

To get around your problem (assuming you don't have a TI-89) you can create a subdirectory of HOME in which you store no variables. So long as you store no numeric variables in HOME either, you can simplify without risk of numeric substitutions if you change to this directory first. Not an ideal solution, and I can't help feeling that there ought to be another way around this, but it should work.

Nigel (still rather puzzled)


#7

Yes, indeed you are right: SIMPLIFY has a different behavior on one or two-variable expressions.

I created a directory with only two variables, T and M, which have real numbers as values.

  • If I type 1/M in the equation writer, select it all, and press SIMPLIFY, nothing is simplified.
  • If I type 1/(M+T) in the equation writer, select it all, and press SIMPLIFY, the expression is evaluated to a real number.
I think this can only be considered a bug, and a major one.
Perhaps the 50g CAS was designed around schoolkids, who need to simplify one-variable expressions but evaluate multi-variable ones? It certainly does not make sense to me.

It is too bad, because this severely limits the usefulness of CAS, which should be the shining point of this calculator. For quick math, my 32SII is a lot faster and simpler to use (and I do not need a .pdf manual to find what I need).

I will give the TI-89 a try... I have the impression that the 50g is complicated without being really advanced.

Luca


#8

Just to be clear about the TI-89: it too will substitute in numeric values when a symbolic expression is entered. However:

  • its behaviour in this regard is consistent
  • there's an easily accessible command "Clear a-z" that clears all one-character variables in the working directory
  • the "|" (substitute) function is a very convenient way to give variables numeric values. For example, "(x+y)/z | x=4 and y=5" evaluates straight to 9/z. I know the HP-50g can do this too, but the syntax is different in algebraic and RPN modes, and I can never remember how to substitute for more than one variable at a time without looking it up.
Despite my complaints, I feel that the HP-50g is far more powerful than anything that TI has produced: it has an awesome number of advanced mathematical functions and functionality programmed into it. However, I just do not find its use intuitive or memorable. The vast power is unavailable even to serious users unless they constantly consult the manual - which you only get in electronic form, unless you print out the 1000 pages yourself!

I know the TI is an algebraic machine, but its editor that lets you paste any previous entry or result into the command line gets around the usual disadvantages of algebraic logic, at least for me. As scientific calculators, I love both machines; the Multiple Equation Solver of the HP machine is truly wonderful. But for algebra or elementary calculus give me the TI any time. It just works!

Nigel


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime graphing bug BruceH 1 466 11-19-2013, 08:14 AM
Last Post: Joe Horn
  HP Prime - another cosmetic bug BruceH 3 587 11-12-2013, 02:18 PM
Last Post: Ken Shaw
  HP Prime Bug bluesun08 19 1,716 10-14-2013, 10:48 PM
Last Post: Han
  HP Prime bug in EDITMAT Han 7 927 09-27-2013, 10:15 AM
Last Post: Han
  [HP 39Gii] - Bug report Jean-Michel 1 460 08-28-2013, 10:53 AM
Last Post: Tim Wessman
  Is the HP-35S bug free? Matt Agajanian 22 1,879 07-01-2013, 04:03 PM
Last Post: Andrés C. Rodríguez (Argentina)
  Has anyone reported this bug to HP? Allen L. 4 566 01-10-2013, 07:41 PM
Last Post: Manolo Sobrino
  Simplify with sci/eng on hp 50g Juraj O. 11 1,007 11-08-2012, 06:26 PM
Last Post: Han
  HP-15C Bug with MATRIX 5 Thomas Klemm 17 1,447 02-04-2012, 05:07 PM
Last Post: Paul Dale
  Another HP-15C LE bug? Benoit Maag 58 3,347 10-03-2011, 05:26 PM
Last Post: Steve Simpkin

Forum Jump: