Approximation mode



#3

Hello,

I'm absolutely puzzled with the following. I wrote program TST as follows:

« -> SB Z M
« SB DUP 30. * 100.
/ 360. Z / /
»
»

It gets 3 values from the stack, does the calculation and leaves the result on the stack and because I switched the approximation mode always on (the same is true vor the RPN mode), the result is e.g. 0.25. OK.

Then I wrote program Z as follows:

« "program Z"
{
{ "S " "" 0. }
{ "Z " "" 0. }
{ "A " "" 0. }
}
{ } DUP DUP
INFORM
DROP -> TAB

« 'TAB' 1. GET
'TAB' 2. GET
'TAB' 3. GET
-> S Z M
'0.' -> I
'0.' -> K
« K S + 30. * 100. / 360. Z / /
»
»
»

Program Z is nearly identical to program TST except that it displays the result in the exact mode, e.g.:

S*30.000
--------
100.000
360.000
-------
Z

I mean, the main difference of the 2 programs is only the way I'm providing the parameters: For TST I'm putting them on the stack and for Z I'm using an INFORM-statement. Does this statement has anything to do with that or what am I doing wrong ? Any hint will be very much appreciated. Thank you.


#4

I forgot to mention that these programs run on a HP-49G


Possibly Related Threads...
Thread Author Replies Views Last Post
  Integration question and "RPN" mode comment Craig Thomas 16 1,460 12-05-2013, 02:32 AM
Last Post: Nick_S
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 440 11-13-2013, 10:03 PM
Last Post: BruceTTT
  Program to change entry mode on Prime Michael de Estrada 3 445 10-28-2013, 10:13 AM
Last Post: Han
  Prime: Exam mode (possible duplicate after funny response first time) Paul Townsend (UK) 1 317 10-24-2013, 03:09 PM
Last Post: Tim Wessman
  Does RPN entry mode cause the Prime keyboard to lock up ? Michael de Estrada 14 1,124 10-22-2013, 06:27 PM
Last Post: John Colvin
  Euler's Constant Approximation Namir 0 192 10-19-2013, 11:32 AM
Last Post: Namir
  HP Prime: Edit integer in RPN mode plivesey 15 1,108 10-18-2013, 04:34 PM
Last Post: kris223
  Temporary User Mode Key Programs not working in RPN BruceTTT 7 675 10-14-2013, 01:46 PM
Last Post: BruceTTT
  HP Prime: MAKELIST in RPN mode? toml_12953 2 357 10-13-2013, 07:40 PM
Last Post: BruceH
  Low battery slow mode Marcel Samek 4 432 09-18-2013, 02:02 PM
Last Post: Harald

Forum Jump: