The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
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 ?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP71B RES bug? - Albert Chan - 01-02-2020 02:05 PM
RE: HP71B RES bug? - Sylvain Cote - 01-02-2020, 03:29 PM



User(s) browsing this thread: 1 Guest(s)