Post Reply 
HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
09-27-2017, 01:40 PM (This post was last modified: 09-27-2017 01:41 PM by pier4r.)
Post: #16
RE: HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
(09-27-2017 11:51 AM)Joe Horn Wrote:  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)

Ah, ok, then I misunderstood. I thought the right function was like 'Y' is not representable by the system, can you give the closer number to Y, starting from X, that can represent Y?

Wikis are great, Contribute :)
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 - pier4r - 09-27-2017 01:40 PM



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