Hi to all the prime lovers out there :)

Could someone give me some feedback on the fastest way to implement prime
checks in Rebol -

Currently I use:

prime?: func [p /local c v][
    v: true
    for c 2 (p - 1) 1 [
        if p // c = 0 [v: false break]
    ]
    v
]

Is there a better way to do this?  I have seen another implementation but
that was about 60 or so lines and seemed slower...


James.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to