Untitled Document Book Cover

PC-based compiling

Course Design

Compiling Hints

Scanf() information.

Assorted C routines.

Errata

Program files

Useful, free, scientific software.

Links (open in new window):
Java Code (unmaintained).

Will's Homepage

PC-based program files


As of 2003 I have been running a Windows machine instead of a Linux box for a variety of reasons. One can now obtain an operating Linux distribution that will run on top of the Windows platform. It's called Cygwin. Do a Google search on that and you will find more information. I have some further information in my open-source software link to the left. This Linux distribution will allow you to run all of the program files as they are listed in the book and available for download here. However, converting the Unix files to compile on a PC running some other compiler will most likely have a problem with the random number generator. The fix for this is straightforward - just add the following function to each program (only the name has been changed from the one I list on page 59 to make the conversion easier):
double drand48(void)
{
return((double)rand()/(double)(RAND_MAX+1));
}


A fix like this will work, but the details will depend on the compiler.