Post Reply 
HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
09-27-2017, 11:51 AM
Post: #10
RE: HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
(09-27-2017 11:22 AM)pier4r Wrote:  I have a question though. From the other thread
Quote:NEIGHBOR(X,Y) [nearest machine-representable number to X in the direction of Y]

Wouldn't be Y representable by the system already? My doubt lies on the point that that the value given to the function is already a valid value for the system, so there is nothing to search.

Would be different with a string in input rather than a number.

Sorry, but I don't understand your question. The only thing that Y does is tell NEIGHBOR which direction to go. If Y>X, then NEIGHBOR(X,Y) returns the very next number GREATER than X which the HP-71 is capable of representing, and if Y<X then it returns the very next number LESS than X. The phrase "machine-representable number" means "limited to a 12-digit mantissa". The function has nothing to do with strings.

Examples:
NEIGHBOR(6,9) --> 6.00000000001 (the nearest machine-representable number above 6)
NEIGHBOR(6,2) --> 5.99999999999 (the nearest machine-representable number below 6)

<0|ΙΈ|0>
-Joe-
Visit this user's website 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 - Joe Horn - 09-27-2017 11:51 AM



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