Posts Tagged ‘maths

16
Jul
12

Finding Primes: Part II – A Python Implementation

As it is easy to get started I first wrote a prime finding algorithm in Python. I used a very basic algorithm for this. I store a list of prime numbers, and I check the numbers less than the square root of the possible prime, if any are a factor of the number I’m checking then it’s a composite otherwise I append it to the list of prime numbers.

The code for this is on my Box account here. Continue reading ‘Finding Primes: Part II – A Python Implementation’

16
Jul
12

Finding Primes: Part I

Over the last week or so I’ve been working on some old code of mine. As the title of this post suggests it is to do with that odd pastime of mathematicians: finding prime numbers. I have made a few attempts to make lists of prime numbers over the years in numerous different ways. This is a small introduction to what will no doubt be a small series of many posts. This is an on going work in C++ although I’ll also be writing about an implementation I wrote in Python and a discussion of why I no longer use it for large calculations. During this process I have also taught myself to use git and in particular GitHub. So if you are interested in being ahead of my posts here is my GitHub and in particular this project.

06
Jul
12

GNU Make and LaTex

This is a post about a recent use I’ve found for make. I generally use make for my C++ projects and think that it’s timestamp based dependencies make life much easier. It also means you only have to think about how you want to build the project once, after that you just type make. Continue reading ‘GNU Make and LaTex’