Some years ago, Geoffrey expressed the dream of having strong testing of our examples. The idea was to generate definitive PostScript results for all our C examples on one platform, and then test the PostScript results for various languages and various platforms against those definitive results. Such testing is much more powerful than our current testing which simply asks the question whether the examples can be generated without segfaults or other obvious errors.
Geoffrey's idea never got off the ground because we didn't know how to implement such powerful tests. The rounding of floating-point results depends very much on the platform, compiler version, and even compiler optimization level. Our Postscript files are heavily rounded to four significant digits, but even in that case the rounding in (say) the 16th figure can occasionally propagate to changing the last digit of the four significant PostScript digits. For example, when the number is close to 1234.500000000000 you may get 1234 or 1235 in the rounded PostScript result depending on whether the rounding for the platform/compiler/optimization adds or subtracts a small quantity from that result. So to properly evaluate differences of PostScript results, you need a "diff" utility that will ignore absolute differences smaller than a specified amount (say 1 unit in the present case). I have just had such a utility pointed out to me on the CMake list. It is called ndiff (http://www.math.utah.edu/~beebe/software/ndiff/ndiff.html). I haven't tried it, but from reading the man page it looks like this should be a nice way of looking for significant differences in PostScript results from the command line rather than having to do time-consuming visual comparisons when diff or cmp show "something" is different between the two files. Beyond such individual tests done on the command line, it looks like ndiff could be exactly what we need for the core of automated strong PLplot testing. Note, I currently don't have time to implement such automated strong PLplot testing myself, but I am drawing this interesting new possibility to the attention of the other developers here in case anybody wants to have a go. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel