User Tools

Site Tools


notes:comporg:projects:pnc0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:comporg:projects:pnc0 [2018/01/21 01:55] – [Program Specifications] ahought2notes:comporg:projects:pnc0 [2018/01/22 13:51] (current) – [Program Output Format] bstrong2
Line 108: Line 108:
 #include <math.h> #include <math.h>
 </code> </code>
 +
 +**sqrt()-less square root approximation (a)-** This is optional, you would do this instead of the sqrt() function. (If you've taken discrete then you know how to do it, if you haven't taken discrete and are looking for moar then this is an option.) The sqrt function in the math library does an exact calculation of a square root. Since we are only dealing with whole numbers for our prime project it is possible to create your own logic to approximate the square root. Since the sqrt function will run for every number that is being checked you are looking at quite a performance increase.
 ---- ----
 **primereg.c** - baseline program (Brute force, no break)\\ \\ **primereg.c** - baseline program (Brute force, no break)\\ \\
Line 133: Line 135:
  
 -**Put all c files in gcc directory from pnc0 grabit** \\ -**Put all c files in gcc directory from pnc0 grabit** \\
--Numbers go to stderr, time goes to stdout \\+-Numbers go to stderr, **time goes to stdout** \\
  
 =====Testing===== =====Testing=====
notes/comporg/projects/pnc0.1516499751.txt.gz · Last modified: 2018/01/21 01:55 by ahought2