(38G) Neighbour Function (Dedekind Cut)
|
09-28-2017, 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/thread-9170.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 »
|
Messages In This Thread |
(38G) Neighbour Function (Dedekind Cut) - Gerald H - 09-28-2017 10:11 AM
|
User(s) browsing this thread: 2 Guest(s)