On 2008-08-11 21:39-0700 Alan W. Irwin wrote: > On 2008-08-11 22:09+0100 Andrew Ross wrote: >> For example 21, some of the differences are just rounding errors. I do >> however see some additional line at the end like. This is from plot3d. >> I also see similar extra lines from the java and octave versions on a >> different machine, so again I suspect a rounding error. > > I am going to have a look at ndiff > (http://www.math.utah.edu/~beebe/software/ndiff/) which is advertised to > ignore rounding errors. I will report back later on its suitability for > our ctest needs.
This project seems to be built with autoconf only so it has a nostalgic feel (the latest release appears to be from 2000). The build, check, and install were pretty straightforward, but I had to create $prefix/bin and $prefix/man/man1 directories before the install would work properly for the special install prefix I specified to the configure script. One of the ndiff command line options is to match lines if the relative differences are less than some limit you specify. So, here is the total output when I compare x11[ct].psc with ndiff using the -relerr 1.d-03 option: 6c6 < %%CreationDate: Tue Aug 12 19:10:56 2008 --- field 5 > %%CreationDate: Tue Aug 12 19:11:52 2008 58601c58601 < eop --- field 5 > 1.0000 0.0000 0.0000 C S 58602c58602 < --- field 1 > eop 58603c58603 < %%Trailer --- field 1 > 58604c58604 < %%Pages: 8 --- field 2 > %%Trailer 58605c58605 < @end --- field 2 > %%Pages: 8 58606c58606 < %%EOF --- field 1 > @end ### Maximum relative error in matching lines = 7.79e-04 at line 33589 field 16 first file is short So from this you know there are some real structural differences between the two files, and you get a nice summary of the maximum relative difference that was less than 1.d-03 at the end which shows in this case that most of the differences between the Tcl and C results are due to rounding. So ndiff may be an optional alternative to diff that we want to try for our last ctest, but before we make that decision, I encourage the developers here to try it since it is at least useful for quickly spotting real differences between files which are ordinarily obfuscated by rounding differences. BTW, ndiff is GPLed software. Andrew, there apparently is a name clash with another Debian package called ndiff, but that sort of issue should be solvable (say by adopting a variant of the name). Thus, I don't really understand why this useful variant of diff has not been packaged for Debian. 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 the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel