[comp.sys.handhelds] Unit Problems Solved!

jn190068@longs.LANCE.ColoState.EDU (Jay Lewis Nestle) (09/26/90)

	Thanks to all of the 48SX gurus out there!!! 
I do see the light now.  The notation seemed to just
throw me off, sorry for rehashing an old topic.  
	Thanks again :-)))))	Happy 48SX user, Jay.

jn190068@longs.lance.colostate.edu
       ...ncar!boulder!ccncsu!longs.lance.colostate.edu!jn190068

  ^  ^
  |/\|
  |  |  "Save the earth, develop space."  -  Bumper Sticker
  /  \
  ----
  |  |

johnt@uccba.uc.edu (John Townsend) (09/26/90)

In article <9700@ccncsu.ColoState.EDU>,
jn190068@longs.LANCE.ColoState.EDU (Jay Lewis Nestle) writes:
|> 
|> 	Thanks to all of the 48SX gurus out there!!! 
|> I do see the light now.  The notation seemed to just
|> throw me off, sorry for rehashing an old topic.  

This reminds me of when I first got my HP-28C when I was in college.  The first
thing I did with it was "acid-test" it by calculating the cube root of -27.
Every sixth-grader knows that the answer to this is simply -3, but most
calculators (including every TI I've ever seen) gag on it.  Up to that time,
the only calculator I'd seen give me a correct answer was a Sharp EL506-P that
I'd gotten for about $10.  Well, my $200 28C coughed out "(1.5,2.59807621135)".
"Bug!!!", I screamed.  Fortunately, before I could send any hate mail to HP,
a friend of mine who was taking Complex Variables at the time reminded me that
I was actually solving a cubic equation, which always has THREE correct answers
in the complex number domain.  Turns out that the 28C returns the first of
these (going around the complex plane counterclockwise from the X axis).  The
other two solutions are (-3,0) and (1.5,-2.59807621135).  The 28C will cube all
of these back into -27.  That sure raised by opinion of HP in a hurry!


--
     John Townsend                        Internet:   mead!johnt@uccba.uc.edu
 c/o Mead Data Central                    UUCP:       ...!uccba!mead!johnt
     P.O. Box 933                         Telephone:  (513) 865-7250 
  Dayton, Ohio, 45401

ryoder@ecn.purdue.edu (Robert W Yoder) (09/27/90)

In article <1473@meaddata.meaddata.com>, mead!johnt@uccba.uc.edu (John Townsend) writes:
> 
> In article <9700@ccncsu.ColoState.EDU>,
> 
> This reminds me of when I first got my HP-28C when I was in college.  The first
> thing I did with it was "acid-test" it by calculating the cube root of -27.
> Every sixth-grader knows that the answer to this is simply -3, but most
> calculators (including every TI I've ever seen) gag on it.  Up to that time,
> the only calculator I'd seen give me a correct answer was a Sharp EL506-P that
> I'd gotten for about $10.  Well, my $200 28C coughed out "(1.5,2.59807621135)".
> "Bug!!!", I screamed.  Fortunately, before I could send any hate mail to HP,
> a friend of mine who was taking Complex Variables at the time reminded me that
> I was actually solving a cubic equation, which always has THREE correct answers
> in the complex number domain.  Turns out that the 28C returns the first of
> these (going around the complex plane counterclockwise from the X axis).  The
> other two solutions are (-3,0) and (1.5,-2.59807621135).  The 28C will cube all
> of these back into -27.  That sure raised by opinion of HP in a hurry!

This feature caused me enormous headaches when trying to debug a root solver
sometime back.  It never occured to me that a calculator might return a
complex cube root.

On the same topic, here is a program I wrote that finds ALL of the roots of
any real or complex number and puts them on the stack in order, as they are
arranged around the origin.

To solve X^(1/N) = Y for Y:

Input: level 2: X
Input: level 1: N

Output: roots in stack levels 1 to N

RTCX
<< -> z0 n
   << z0 ABS n INV ^
z0 ARG n / (0,1) *
EXP * (0,2) n / [pi] *
EXP -> m a
    << 0 n 1 -
       FOR k a k ^ m
* ->NUM ROUN          ;ROUN is optional
       NEXT
    >>
  >>
>>
-- 
Robert Yoder  306 Hawkins Graduate House, West Lafayette, IN 47906 (317)495-6845
Internet: ryoder@ecn.purdue.edu           "Flame all you want, We'll post more."
UUCP:     pur-ee!ryoder                         Apologies to Jay Leno & Doritos.
Bitnet:   ryoder@ecn.purdue.edu@purccvm.bitnet

rrd@hpfinote.HP.COM (Ray Depew x2419) (09/29/90)

Recognizing that the temperature mathematics as incorporated in the HP48SX
UNITS application still left something to be desired, HP included a couple
of fixes in the HP Equation Library card.  In the UTILS menu you will
find two functions, labeled TDELTA and TINC.

TDELTA returns the difference (delta-T) between two temperatures.  The units
of the Level 2 argument are preserved in the result.  Examples:

	20_oC  20_oC  ---->  0_oC

	120_oC  90_oF  --->  87.78_oC

	70_oF   30_K  --->  475.67_oF

TINC adds the temperature increment (Tinc) in Level 1 to the temperature in
Level 1.  The units of the Level 2 argument are preserved in the result.  
Examples:

	20_oC   20_oC  --->  40_oC

	70_oF   10_oC  --->  88_oF

	273_K  90_oC  --->  383_K

Think of TDELT and TINC as "the other subtraction and addition functions."


Regards
Ray Depew
HP Colorado IC Division 
rrd@hpfitst1.hp.com

lishka@uwslh.slh.wisc.edu (a.k.a. Chri) (09/29/90)

mead!johnt@uccba.uc.edu (John Townsend) writes:
>This reminds me of when I first got my HP-28C when I was in college.  The first
>thing I did with it was "acid-test" it by calculating the cube root of -27.
>[...]  Well, my $200 28C coughed out "(1.5,2.59807621135)".
>"Bug!!!", I screamed.
>[...]
                                           _
Hmmm...interesting.  When I type "-27 3 x\/Y" (where the last bit is
"take the x root of y") my HP48sx returns -3, which is the answer one
would expect (although there are two other complex answers, as was
pointed out by the above posting).

-- 
Christopher Lishka 608-262-4485  "Dad, don't give in to mob mentality!"
Wisconsin State Lab. of Hygiene                                -- Bart Simpson
   lishka@uwslh.slh.wisc.edu     "I'm not, Son.  I'm jumping on the bandwagon."
   uunet!uwvax!uwslh!lishka                                    -- Homer Simpson