Set.st
changeset 9318 42d7dac12b73
parent 9310 67c88085c9bc
child 9415 d13968e693c3
--- a/Set.st	Tue Apr 18 11:44:27 2006 +0200
+++ b/Set.st	Tue Apr 18 11:44:37 2006 +0200
@@ -165,15 +165,11 @@
      500k elements; if you have bigger ones, add some more primes here ...
     "
     n <= 524288 ifTrue:[
-	   "2  4  8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288"
-	^ #(7  7 11 17 37 67 131 257 521 1031 2053 4099 8209 16411 32771 65537 131101 262147 524309) at:(n highBit)
+           "2  4  8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288"
+        ^ #(7  7 11 17 37 67 131 257 521 1031 2053 4099 8209 16411 32771 65537 131101 262147 524309) at:(n highBit)
     ].
-    "
-     make it odd - at least
-    "
-    ^ n bitOr:1
 
-    "Modified: 19.3.1997 / 16:07:59 / cg"
+    ^ n nextPrime
 ! !
 
 !Set class methodsFor:'utilities'!
@@ -1041,8 +1037,6 @@
     ^ tally
 ! !
 
-
-
 !Set methodsFor:'testing'!
 
 capacity 
@@ -1154,7 +1148,7 @@
 !Set class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.94 2006-04-06 10:14:34 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.95 2006-04-18 09:44:37 cg Exp $'
 ! !
 
 Set initialize!