SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Each subdirectory of this directory corresponds to a chapter in the book "Computations in algebraic geometry with Macaulay 2". Each directory has a file 'chapter.m2' which contains all the input to Macaulay 2 from that chapter, and a file 'chapter.out.expected', which contains the Macaulay2 output obtained at the time the book was made.

We ensure that Macaulay 2 continues to produce essentially the same answers for computations in the book, despite further development of the program. It's impossible to ensure that the answers are exactly the same. There are some trivial reasons for this: for example, displayed execution times will change. A less trivial reason is that the way in which entries are stored in a hash table depends on hash codes, which are assigned in an arbitrary but deterministic way that varies from one version of Macaulay 2 to the next, simply because many hash codes are assigned sequentially as objects are created. Finally, algorithms can change and yield slightly different but equivalent answers. For example, the authors of Singular-Factory use a random number generator whose seed depends on the time of day, and thus the ordering of polynomial factors returned by 'factor' was never predictable until we decided to reset the seed just before attempting to factor a polynomial. So now at least the results of 'factor' are predictable, but different from what they were before.

Thus each directory also contains a file 'test.m2', derived from 'chapter.m2' in order to make a good test, by avoiding the complications discussed above, or replacing the former answers by the currently expected answers. The file 'test.out.expected' contains the expected output, more or less. Use the command

make changes

to see the differences between chapter.out.expected and test.out.expected, if you wonder whether we did it right. Use the command

make tests

to run the tests. Use a command like

make d-modules.test

to run the tests in the directory 'd-modules'. Use

make clean

to erase the output.

The files called 'patterns' in this directory and the chapter directory are used with 'sed' to filter out text which need not match, for example, displayed execution times.


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.