Post Reply 
newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
11-02-2017, 01:21 PM (This post was last modified: 11-02-2017 01:25 PM by Claudio L..)
Post: #228
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25]
(11-01-2017 04:48 PM)Gilles59 Wrote:  This is a program that give the first divisor of an integer or the number himself if prime (idea is to be fast no small) :

Here's a similarly fast without using KILL, and it returns all factors:

Code:

«
2 WHILE DUP2 SQ ≥ REPEAT
     DUP2 IF IDIV2 THEN 
              DROP NEXTPRIME
              ELSE
              ROT DROP OVER
              END
   END
DROP
»
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: Alpha demo 0.9 released [UPDATED 2017-10-25] - Claudio L. - 11-02-2017 01:21 PM



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