Click here to Skip to main content
16,015,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: I need help with prime numbers. Pin
Luc Pattyn26-Jan-08 14:51
sitebuilderLuc Pattyn26-Jan-08 14:51 
GeneralRe: I need help with prime numbers. Pin
Alex50126-Jan-08 18:05
Alex50126-Jan-08 18:05 
GeneralRe: I need help with prime numbers. Pin
GuyThiebaut26-Jan-08 13:18
professionalGuyThiebaut26-Jan-08 13:18 
GeneralRe: I need help with prime numbers. Pin
Luc Pattyn26-Jan-08 14:52
sitebuilderLuc Pattyn26-Jan-08 14:52 
GeneralRe: I need help with prime numbers. Pin
GuyThiebaut26-Jan-08 22:52
professionalGuyThiebaut26-Jan-08 22:52 
GeneralRe: I need help with prime numbers. Pin
Alex50126-Jan-08 18:13
Alex50126-Jan-08 18:13 
GeneralRe: I need help with prime numbers. Pin
PIEBALDconsult26-Jan-08 15:57
mvePIEBALDconsult26-Jan-08 15:57 
GeneralRe: I need help with prime numbers. Pin
Luc Pattyn26-Jan-08 16:18
sitebuilderLuc Pattyn26-Jan-08 16:18 
So far the linear sieve has not been mentioned nor shown in code in this thread, and it is
not the way I would recommend to have a program determine primality for a specific number.
The sieve methods are fine to explain the concept, and to execute by hand (i.e. for small
numbers) since no divisions are required at all; successive division attempts are the normal
first-order attempt in a program.

For large numbers (say above 100 digits) completely different techniques are available
and are getting refined all the time to investigate primality; most of them use shortcuts
that reduce the computational effort tremendously at the expense of a little uncertainty
(false positives for some tests, false negatives for other tests). And special libraries
("big integer" or "multiple precision" are used to operate on those numbers).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralIC Programmer with C#. Pin
hdv21226-Jan-08 8:20
hdv21226-Jan-08 8:20 
GeneralRe: IC Programmer with C#. Pin
DaveyM6926-Jan-08 8:37
professionalDaveyM6926-Jan-08 8:37 
GeneralRe: IC Programmer with C#. Pin
Spacix One26-Jan-08 9:19
Spacix One26-Jan-08 9:19 
GeneralRe: IC Programmer with C#. Pin
hdv21226-Jan-08 11:02
hdv21226-Jan-08 11:02 
Questioncreating logger based on threads and queue Pin
kriskris26-Jan-08 3:43
kriskris26-Jan-08 3:43 
GeneralRe: creating logger based on threads and queue Pin
Paul Conrad26-Jan-08 5:42
professionalPaul Conrad26-Jan-08 5:42 
GeneralRe: creating logger based on threads and queue Pin
Adeel Chaudhry26-Jan-08 6:29
Adeel Chaudhry26-Jan-08 6:29 
GeneralAppDomain with non domain-neutral assemblies Pin
Softbal26-Jan-08 3:25
Softbal26-Jan-08 3:25 
GeneralBrowser Help Object BeforNavigate problem Pin
sepel25-Jan-08 23:30
sepel25-Jan-08 23:30 
GeneralWindows right click menu... Pin
anderslundsgard25-Jan-08 23:04
anderslundsgard25-Jan-08 23:04 
GeneralRe: Windows right click menu... Pin
Abhijit Jana25-Jan-08 23:24
professionalAbhijit Jana25-Jan-08 23:24 
GeneralRe: Windows right click menu... Pin
DaveyM6925-Jan-08 23:29
professionalDaveyM6925-Jan-08 23:29 
GeneralRe: Windows right click menu... Pin
Spacix One26-Jan-08 6:03
Spacix One26-Jan-08 6:03 
GeneralWhere to find everything about Intellisence in VS 2008 Pin
anderslundsgard25-Jan-08 22:42
anderslundsgard25-Jan-08 22:42 
GeneralRe: Where to find everything about Intellisence in VS 2008 Pin
pmarfleet26-Jan-08 5:32
pmarfleet26-Jan-08 5:32 
GeneralBest way to provide controls to plugins Pin
rotsey25-Jan-08 22:16
rotsey25-Jan-08 22:16 
GeneralRe: Best way to provide controls to plugins Pin
DaveyM6926-Jan-08 13:08
professionalDaveyM6926-Jan-08 13:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.