HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
|
09-27-2017, 11:53 AM
(This post was last modified: 09-28-2017 05:36 AM by Gerald H.)
Post: #11
|
|||
|
|||
RE: HP 50g: Neighbour Function (Dedekind Cut) Programme Challenge
Bravo Werner! I consider your contribution a complete solution & don't expect a shorter version (although "6 - 6 -" is ornate), would however be very pleased to see a more concise programme.
To keep my word & amuse Joe here's my version: Edit: Corrected my programme to give correct result for zero. I have learned much from this thread, eg that .000000000001 is not the nearest representable number to zero. I doubt that, given Werner's programme, anyone will now try this programme but the wrong result irritated me. Code: :: Which does have the advantage of giving no wrong answers, ie for input 9.99999999999E499 1 Joe's returns 9.99999999999E499 & for 9.99999999999E499 9.99999999999E499 Werner's returns 9.99999999999E499 while for 9.99999999999E499 my programme errors. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)