HP71B RES bug?
|
01-02-2020, 02:05 PM
Post: #1
|
|||
|
|||
HP71B RES bug?
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 ? |
|||
01-02-2020, 03:29 PM
(This post was last modified: 01-02-2020 03:31 PM by Sylvain Cote.)
Post: #2
|
|||
|
|||
RE: HP71B RES bug?
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 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)