HP Forums
Approximation mode - Printable Version

+- HP Forums (https://archived.hpcalc.org/museumforum)
+-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html)
+--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html)
+--- Thread: Approximation mode (/thread-14931.html)



Approximation mode - Karl-Ludwig Butte - 02-10-2002

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.


Re: Approximation mode - Karl-Ludwig Butte - 02-10-2002

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