[squeak-dev] Integer>>isPrime why reverting Knuth's algorithm P
primality test) with iteration over division with even numbers?
enrico.spinielli at googlemail.com
Fri Dec 18 16:25:45 UTC 2009
I am back to checking Squeak after quite a while and got latest trunk.
I looked after one of my contributions Integer>>isPrime
and I found my implementation of Algorithm P from Knuth's AOCP vol 2
substituted by an iteration of dividing self by all even numbers starting
and (correctly) stopping at self sqrtFloor.
This is IMHO a questionable/useless "improvement", not even looking to try
to implement the Sieve of Eratostene...!
Again IMHO isPrime should be reverted back to what has been renamed
Not being anymore used to contribute I just signal it here...
Hope it helps
"Do Androids dream of electric sheep?"— Philip K. Dick
"Hear and forget; see and remember;do and understand."—Mitchel Resnick
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev