Post Reply 
NEIGHBOR function in RPL
06-06-2015, 03:03 PM
Post: #6
RE: NEIGHBOR function in RPL
(06-06-2015 12:55 PM)Werner Wrote:  and NEIGHBOR(0,1)? Should be 1e-499.

I have these:

Code:
@ NXT
@ In: x
@ Out: next number larger than x
\<<
  IF DUP THEN DUP XPON ELSE -488 END
  ALOG SWAP OVER /     @ 10^n s*m
  1E-11 OVER -1 SAME ALOG / + *
\>>
  
@ PRV
@ In: x
@ Out: next number smaller than x
\<< +/- NXT +/- \>>

@ NEIGHBOR
@ In: x y
@ Out: next x in the direction of y
\<< IF OVER < THEN PRV ELSE NXT END \>>


Cheers, Werner

Powers of ten lack precision.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
NEIGHBOR function in RPL - Joe Horn - 06-05-2015, 09:03 PM
RE: NEIGHBOR function in RPL - Gerald H - 06-06-2015, 09:17 AM
RE: NEIGHBOR function in RPL - Werner - 06-06-2015, 12:55 PM
RE: NEIGHBOR function in RPL - Gerald H - 06-06-2015 03:03 PM
RE: NEIGHBOR function in RPL - Werner - 06-06-2015, 03:30 PM
RE: NEIGHBOR function in RPL - Gerald H - 06-06-2015, 03:45 PM
RE: NEIGHBOR function in RPL - Gerald H - 06-06-2015, 03:41 PM
RE: NEIGHBOR function in RPL - Gerald H - 06-06-2015, 03:50 PM



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