This zip file contains the Sage equivalents of the Java programs that were used
in the book. The programs have been tested with Sage 4.7.1.

The newton.sage and newton.sws files are the Sage equivalent of Listing 2.1 in
Section 2.6. The newton.sage file can be run on the command line if you have
Sage installed locally:

	sage newton.sage

That will show the output in the terminal window using (0,0) as the initial
point. Simply edit the newton.sage file by changing the last line if you want to
use a different initial point (e.g. newton(-1,-1) or newton(-5,-5) instead of
newton(0,0)).

The newton.sws file is a Sage worksheet that can be opened in a Sage notebook by
clicking the Upload link in the notebook and then clicking the "Browse..."
button to select the newton.sws file. After the worksheet has been loaded click
in the input area and then click the evaluate link to run the worksheet. You can
run the newton(*,*) function with different initial points as described above.

Similarly, the montecarlo.sage[.sws] and montecarlo2.sage[.sws] files are the
Sage equivalents of Listings 3.1 and 3.2, respectively, in Section 3.4. The
.sage files can be run on the command-line as described above, and the .sws
files can be opened as worksheets in a Sage notebook as described above. In both
cases the initial number of random points used is N=10. To change this, simply
edit the last line of each file to use a different number of points in the
corresponding function (e.g. montecarlo(100) or montecarlo2(10000)).

The tops of the .sage files have brief descriptions of what the programs do.
