(38G) Neighbour Function (Dedekind Cut)

09282017, 10:11 AM
Post: #1




(38G) Neighbour Function (Dedekind Cut)
The three programmes below together perform the Neighbour function & Dedekind cut.
For the development of the programmes please see: http://www.hpmuseum.org/forum/thread9170.html The Neighbour function for a real number N finds the nearest number to N that the calculator can represent. The Dedekind cut returns for real input N the upper & lower nearest numbers to N that the calculator can represent. The first programme accepts a real number input on the Home screen & returns the upper nearest number in Ans. NXTUP Code: Ans►N: The next programme accepts a complex number as input on the Home screen, say (x,P) where you require the neighbour of x & P is either 1 or 1, 1 indicating the upper neighbour & 1 the lower, & returns the result in Ans. NEIGHBOR Code: Ans►Z0: Finally for real number input in the Home screen the programme DCUT returns a complex number in Ans, the real part being the upper & the imaginary part the lower neighbour. DCUT Code: Ans►D: 

« Next Oldest  Next Newest »

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