▼
Posts: 23
Threads: 4
Joined: Jan 1970
Does anyone have a quick solution for "square and/or nth root" with the HP 42s. Do I have to write a short Programm for this?
Thank's
Robin
BTW:
Oh I'm already waiting soo long for an HP 42s replacement, how long will I have to wait for it, if it will be similar to the delays of the 33s ;)
▼
Posts: 38
Threads: 7
Joined: Jan 1970
I'm not sure what you are looking for but would it be to take the cubic root of nine the.
9 enter
3 1/x and
y^x.
Did that do it or are you looking for something else.
Kim
▼
Posts: 23
Threads: 4
Joined: Jan 1970
sorry, in my hurry I wrote square instead of cube..
Im searching for the function "x root y" which isn't on the 42s. It should take the nth root of a number, like "3rd root of 27 would equal 3".
▼
Posts: 1,193
Threads: 43
Joined: Jul 2005
In most HP calculators, there is no nth root key. Since obtaining the nth root is the same than applying the inverse of the nth power, you apply the already described sequence...
To get the Pth root of Q you should key:
value of Q
ENTER
value of P
1/X
Y^X
For example, "the fourth root of 16" is the same than "16 at the 1/4 power"
16
ENTER
4
1/X (result: 0.25)
Y^X (result: 2 q.e.d.)
▼
Posts: 23
Threads: 4
Joined: Jan 1970
Thank's, Kim and Andrés  that's all i wanted to know :).
So the missing key shows how little some people (like me) know about math ;) ..and I found it finally in the original manual, too ;)
I would prefer not seeing that key on a new layout now as i know how to do it without, so the keyboard stays clearer.
Same thing with the x^2 key on my HP 42s. could also press enter * , the only advantage is the saving of the tStack wenn using x^2.
Edited: 31 Jan 2004, 12:08 p.m.
▼
Posts: 1,193
Threads: 43
Joined: Jul 2005
Posts: 1,792
Threads: 62
Joined: Jan 2005
Robin posted 
Quote:
"I would prefer not seeing that key [y^(1/x) key] on a new layout now as i know how to do it without, so the keyboard stays clearer."
One advantage of the special key for "root" exponents is that realvalued oddinteger roots of negative numbers can be found directly. For example, on a 32Sii,
(8)^(1/3) using the "xth root of y" function gives 2.000 as the answer.
However, using 1/x, then y^x on any calculator to find a realvalued result will give an error message, because
(8)^(1/3) = exp{ln[(8)^(1/3)]} = exp[1/3*ln(8)]
which is undefined due to "ln" of negative argument.
In complex mode, the 15C (flag 8 set) and the 42S ("CRES" set) will give
1+i*sqrt(3) = 1.00 + i1.732
as the answer to (8)^(1/3), using 1/x and y^x.
Edited: 31 Jan 2004, 3:22 p.m.
▼
Posts: 1,193
Threads: 43
Joined: Jul 2005
Karl: the situation you describe happened indeed with the first HP models (at least as far as the HP25) but about the time the HP27 and the HP67 were introduced, the case of the oddinteger roots of negative numbers was included as a valid, non error case. Without resorting to complex modes, many HP models (from about 1977 on) will give 2 as the cubic root of 8.
When in complex mode, the HP15C and the HP42S will give the principal value for the cubic root of 8, which is the root located in the first quadrant; that is why the answer is a complex number. In real mode, the answer will be 2 and no error condition will be claimed.
▼
Posts: 23
Threads: 4
Joined: Jan 1970
Andrès, what Karl wrote happens exactly with my HP 42S. Maybe there where different ROMS? I don't think so, but who knows..
Anyway, I just hope we don't touch negative cube roots in our exam, it would surprise me because we haven't done something with them so far.
BTW: Couldn't I just take the cube root of the positive value and then at last change the sign???
Posts: 1,193
Threads: 43
Joined: Jul 2005
Robin, Karl:
I made a mistake, I apologize. Yhe evolution around 1977 was to accept negative entries for INTEGER POWERS, not roots (fractional powers), as I mistakenly stated.
Before evolution (HP25), (2)^3 displays Error
After evolution (HP27,67,41), (2)^3 displays 8
While the workaround is not very complex (no pun intended!), it will take some steps from a scarce memory pool when developing programs for these calculators; that is why this was a welcome advance. For manual operations, it was not a big issue.
Yhank you!
▼
Posts: 1,792
Threads: 62
Joined: Jan 2005
Andres, Robin 
Good, informative discussion. I think we're all on the same page, and have it right. I learned a couple things myself, regarding the enhancements of early units and why one of the complexvalued roots of (8)^(1/3) is considered the "primary" root. (The other root, of course, is the complex conjugate of the primary.)
Robin is right that taking the negatvieinteger root of the absolute value of the argument, then negating the answer, is the workaround. In fact, this is what I suspect is the basis of the algorithm on improved later HP's for integer exponents of negative numbers:
For x > 0.00 (floatingpoint) and n an integer,
(x)^n = exp[n*ln(x)]*[(1)^n] (change sign of result if n is odd)
Of course, this applies only if n is an integer.
Now, if y = 0 in y^x, x must be positive  Negative x yields divide by 0, and x = 0 yields undefined 0^0  READERS: Please don't launch that thread again!.
Makes one appreciate what a complete implementation of mathematical functionality entails, doesn't it?
Edited: 1 Feb 2004, 3:49 p.m.
▼
Posts: 312
Threads: 25
Joined: Jan 1970
Quote: Now, if y = 0 in y^x, x must be positive  Negative x yields divide by 0, and x = 0 yields undefined 0^0  READERS: Please don't launch that thread again!
TOO LATE! 8^)
Ernie
Posts: 1,755
Threads: 112
Joined: Jan 2005
"Now, if y = 0 in y^x, x must be positive  Negative x yields divide by 0, and x = 0 yields
undefined 0^0  READERS: Please don't
launch that thread again!."
Have a look at this interesting link:
http://www.faqs.org/faqs/scimathfaq/specialnumbers/0to0/
My own opinion is that assigning 0^0 the value 1 is far more useful and consistent that simply leaving it undefined. It isn't more 'true', just more useful.
Also, I've found it very intuitive and enlightening to consider the value of the function x^n for integer, positive n to actually mean the number of times you need to multiply 1 by n to compute the result. So:
X^1 = 1 * X (multiply 1 by X once)
X^2 = 1 * X * X (multiply 1 by X twice)
X^3 = 1 * X * X * X (multiply 1 by X thrice)
and so on. Then we have, naturally:
X^0 = 1 (multiply 1 by X zero times)
and further, when X happens to be zero:
0^0 = 1 (multiply 1 by 0 zero times)
So this natural definition fully coincides with the usual
values of x^n for integer, positive n, and has no problem
at all when either x or n or both are zero.
For negative n, just change "multiply" to "divide".
Best regards from V.
▼
Posts: 2,309
Threads: 116
Joined: Jun 2005
As Karl, wrote, please DO NOT START THE 0^0 THREAD AGAIN.
There are good reasons to expect it to be 1. There are good reasons to expect it to be 0. There are even reasons to expect it to be other values; in fact, for any numeric value you can easily construct an argument that 0^0 should be that value. That is why it is undefined. If you make it evaluate to any particular numeric value (0, 1 or something else), it will be wrong for at least some of the cases.
I'm not going to give any mathematical explanations because this has been discussed to death already. You can find any number of discussions of it using Google.
