Prime: Difference between revisions
From Freephile Wiki
Created page with "== Prime Real Estate == This demo page http://www.whatwg.org/demos/workers/primes/page.html from the Web Hypertext Application Technology Working Group shows prime numbers. W..." |
No edit summary |
||
Line 2: | Line 2: | ||
This demo page | This demo page | ||
http://www.whatwg.org/demos/workers/primes/page.html | http://www.whatwg.org/demos/workers/primes/page.html | ||
from the Web Hypertext Application Technology Working Group shows prime numbers. What I found interesting is that initially, it takes a few moments to find prime numbers; meaning that they are "far apart" as you examine every number up to say 1,000,000. But suddenly the demo application is spitting out prime numbers faster than you can read. So, apparently there are a lot of prime numbers once you get into the larger numbers. But this isn't actually true. If you look at the distribution of primes, there are "more" smaller primes than larger primes. Hmm. | from the Web Hypertext Application Technology Working Group shows prime numbers. What I found interesting is that initially, it takes a few moments to find prime numbers; meaning that they are "far apart" as you examine every number up to say 1,000,000. But suddenly the demo application is spitting out prime numbers faster than you can read. So, apparently there are a lot of prime numbers once you get into the larger numbers. But this isn't actually true. If you [http://yoyo.cc.monash.edu.au/~bunyip/primes/ look at the distribution of primes], there are "more" smaller primes than larger primes (X < 200) <ref>http://primes.utm.edu/howmany.shtml</ref>. Hmm. | ||
<source lang="html5"> | <source lang="html5"> | ||
Line 28: | Line 28: | ||
In this example, the main document spawns a worker to (na�vely) compute prime numbers, and progressively displays the most recently found prime number. | In this example, the main document spawns a worker to (na�vely) compute prime numbers, and progressively displays the most recently found prime number. | ||
== Word of the Day == | |||
{{References}} | |||
[[Category:JavaScript]] | [[Category:JavaScript]] |