HP71B RES bug? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: HP71B RES bug? (/thread-14294.html) |
HP71B RES bug? - Albert Chan - 01-02-2020 02:05 PM I had assumed RES = result of last expression (or last DISP expression) However, RES may be affected by user defined function. >10 DEF FNK(K,X) = K*X >20 DEF FNR(X) = FNROOT(1,2,FVAR*FVAR-X) >RUN >1 + 0 1 >FNK(2,RES) + FNK(3,RES) + FNK(4,RES) ; expected 2*1 + 3*1 + 4*1 = 9 32 ; got 2*1 + 3*2*1 + 4*3*2*1 = 32 >FNR(RES*2) + FNR(RES/2) ; expected √64+ √16 = 12 10 ; got √64 + √4 = 10 Is this a bug ? RE: HP71B RES bug? - Sylvain Cote - 01-02-2020 03:29 PM The reference manual says: Code: The HP-71 stores the result of each numeric assignment and calculator statement in a register re- So I would assume that the equal of the user defined function fit the above description and it matches you're "got" values. Step 1 : 1 + 0 Code: 1 + 0 // RES is set to 1 Step 2 : FNK(2,RES) + FNK(3,RES) + FNK(4,RES) Code: // RES has 1 Step 3 : FNR(RES*2) + FNR(RES/2) Code: // RES has 32 |