Post Reply 
HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
09-27-2017, 12:24 PM
Post: #13
RE: HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
Joe: what does NEIGHBOR return if X=Y?
Gerald:
(09-27-2017 11:53 AM)Gerald H Wrote:  for

9.99999999999E499
9.99999999999E499

Werner's returns

9.99999999999E499

No, it errors out, as (for now) it considers it has to go up to the next number.
I guess your overflow flag is cleared, then it returns 9.99999999999e499
I'd say when X=Y the number should be returned unchanged, so:

Code:
\<<
  IF DUP2 SAME THEN DROP
  ELSE 
    IF OVER < THEN NEG NXT NEG ELSE NXT END
  END
\>>

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge - Werner - 09-27-2017 12:24 PM



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