153
edits
m (→Project Ideas) |
|||
| Line 43: | Line 43: | ||
I just open the caliper case, cut the battery trace (which one doesn’t matter), drill two holes to allow the fine (wire wrap) wire to come out the top to a micro-miniature slide switch glued to the top. I always turn the switch off, rather than press some caliper “off” button, and find that a button cell lasts for many years. I would attach a picture if Sparkfun allowed, but it doesn’t. Caliper thickness is unchanged, and the outline is very nearly unchanged. | I just open the caliper case, cut the battery trace (which one doesn’t matter), drill two holes to allow the fine (wire wrap) wire to come out the top to a micro-miniature slide switch glued to the top. I always turn the switch off, rather than press some caliper “off” button, and find that a button cell lasts for many years. I would attach a picture if Sparkfun allowed, but it doesn’t. Caliper thickness is unchanged, and the outline is very nearly unchanged. | ||
|- | |||
|'''prime number generator'''|| thought || Invert the sieve of Aristophanes, so the data structure holds primes and the next multiple of each prime. Keep the data-structure sorted by the next multiple. When a gap occurs between the current nearest multiple and the next nearest the gap contains prime number(s). | |||
The algorithm requires sorting subsequent multiples into place. | |||
If N is the number of discovered primes N, and the size of the primes is S: | |||
memory use is O(N*S) | |||
cpu use is O(S*N*N) | |||
Other ideas: | |||
* use wheel factorisation of the first M primes to compactly and efficiently represent the impact of these first M primes, where M is chosen so the product of these primes fit in a machine word, and so that the primes less than the product fit in affordable memory. | |||
* use interval arithmetic to keep track of the intermediate numbers. | |||
* can it be fitted to hardware? | |||
|- | |- | ||
|} | |} | ||
==Dumb Ideas== | ==Dumb Ideas== | ||
{|border="1" cellpadding="5" cellspacing="0" | {|border="1" cellpadding="5" cellspacing="0" | ||
edits