From: jhmeyers@miu.edu (John H Meyers)
Newsgroups: comp.sys.hp48
Subject: Algebraic, User-friendly HP48 (at last!)
Date: 13 Sep 1998 11:27:57 GMT
Organization: MIU Computer Services,  Fairfield, IA 52557.  Not Approved.
Lines: 66
Message-ID: <6tga7t$di$1@news.iastate.edu>
References: <35fb4268.0@news1.tm.net.my>
Reply-To: jhmeyers@miu.edu
NNTP-Posting-Host: vax1.mum.edu
Xref: republic.btigate.com comp.sys.hp48:15880

In article <35fb4268.0@news1.tm.net.my>,
"Dheera V." <tgv123@tm.net.my> writes:

> Does anyone know where to get a user-friendly arithmetic program
> for the HP48G?

> I don't like the way I have to enter simple things...
> I just want to be able to type 234798 + 27349 ENTER
> and get an answer..., etc...

  ['] 234798 + 27349 ENTER EVAL

> I have a G model so I can't afford much ram either
> (less than 5k if possible)

%%HP: T(3); @ Algebraic calculator, using ENTER as "equals" key

@ Type in       See result (just below "status line")
@ -------       ----------

@ 2 ^ 3         8
@ 4 * 5         20
@ + 5           25       Note the "chained" calculations,
@ 1/x [INV]     .04      using previous results
@ [SquareRoot]  .2
@ * 150         30
@ SIN           .5       (assuming "degrees" angle mode)
@ 2 -           1.5      New value minus previous answer!
@ 6 /           4        New value divided by previous answer!
@ LOG (100)     2        All algebraic expressions are okay
@ (2 + 3) * (4 + 5)      Etc.

\<< -55 CF { } TMENU DEPTH NOT 0 IFT
  DO DUP \->STR
    IFERR "" INPUT THEN DROP2 ERRN DOERR
    ELSE 39 CHR "(" ")" \-> p n q l r
      \<< q l + p + r + n +
        IFERR OBJ\-> THEN DROP q n +
          IFERR OBJ\-> THEN DROP q n + l + p + r + OBJ\-> END
        END EVAL
      \>>
    END
  UNTIL 0 END
\>> @ Loops until CANCEL is pressed (once or twice)

@ Program starts with initial value from level 1, if any.

@ If you use two DUP's instead of one,
@ then a "history" of all answers will be saved on the stack.

@ Checksum and bytes: #4CFAh, 267 (just fits in less than 5K, eh?)

----------------------------

"'Tis the gift to be simple, 'tis the gift to be free,
 'tis the gift to come round where we ought to be;
 and when we find ourselves in the place just right,
 'twill be in the valley of love and delight.

 When true simplicity is gained,
 to bow and to bend, we sha'nt be ashamed;
 to turn, turn, will be our delight,
 'till by turning, turning, we come round right."

-----------------------------------------------------------
With best wishes from:   John H Meyers   <jhmeyers@mum.edu>