TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Bill Birrell
from: Robin Sheppard
date: 1998-08-18 21:24:02
subject: Prime numbers

BB> To put it simply 1 & 2 are starting primes, so every second bit is
 BB> reset,  then every odd third bit that is still a 1, then every 
 BB> fifth odd bit beyond 6 that is still a 1, then every 7th 
 BB> bit that is still a 1, then every 11th bit and so on. It's 
 BB> astonishing how quickly the loops terminate.

   Yeah, that's a great idea.  Sometimes people insist on looking for an 
   overly complicated solution, and ignore the brutally simple one staring 
   them in the face.
   
   Bitwise operations instead of divisions and such?  No wonder it executes 
   fast.  :>
   
... RAM = Rarely Adequate Memory
___ Blue Wave/DOS v2.30 [NR]

--- Maximus 2.01wb
* Origin: Basic'ly Computers: Mooo-ing Right Along. (1:153/9)
SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 153/104 2 716 7715 140/1 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.