# 620-113NT

## Course Outline

Outline,PDF (24 K)

## Bibliography

Bibliography,PDF (58 K)

## Assignment

The assignment will be given out after the second lecture, and the last date for submission is Thursday 24th August. It is preferable that you complete and hand them after we have discussed the material in class rather than leaving them to the last minute as this gives me time to give you some feedback. Place assignments in the 620-113 box (number 1) in the North corridor of the Richard Berry Building or bring them to class. Don't forget to complete and sign a plagiarism cover-sheet, available from the Department Office, and attach it with your assignment work.

Assignment,PDF (59 K)

 set style data steps<br>
set size square<br>
pi(x)=a function of x using binary operations *,+,-,/ and common functions log(x),exp(x) etc
plot [x=2:50] [0:40] pi(x),'1000primes.txt'


In the 3rd command is where you define your guess function and you can use the up arrow on your keyboard to recover previous function definitions, edit them and try them out again. The 4th command is the plot command and it assumes that you have the data file in the same directory as the Gnuplot binary. You can adjust the x and y ranges to see how well you are going in different ranges. Once you have found a good guess then you can examine the error or difference between the guess and the data with the following command

 plot [x=2:7919] [-5:12] '1000primes.txt' using ($1):($2)-pi(\$1)


This is a more exacting test of your guess so you may need to go back to one of the earlier steps and try something new or a little bit more sophisticated - remember that we want a fairly simple equation. Once you have got a good fit then you can print out the graphs using the following series of commands, which assumes one has a postscript printer but use the specific device that you have (there is a list in the documentation)

 set output 'output.ps'
set terminal postscript


then issue the plot command again, which will send the plot to the file output.ps which you can print out. To have the plot displayed in a window again just use<br>

 set terminal win


If you get into strife then come and see me. We can even try things out on one of the PCs in the Computer Lab.

## Maple worksheets, Data and PS files

Maple worksheet of simple examplesmw (136 K)
Sieve of Eratosthenes (up to 499),PDF (11 K)
First 1000 primes,PDF (15 K)
Data set of first 1,000 primes,TXT (13 K)
Data set of first 10,000 primes,TXT (105 K)
Data set of first 100,000 primes,TXT (1240 K)