On Friday 25 Nov 2011 19:26:32 Waldek Hebisch wrote: > I am doing only minimal validation: basically I am checking that > files compile correctly and check by hand few examples. It would > be good to have some automatic tests, but floating point rounding > is a problem. One possibility is to have special routines to > test that data structures in memory are OK (such test routine > should allow some fuzz in comparisons to compensate for floating > point errors) and speparate tests for writing files (where we > could use "simple" numbers, so that results are repeateable). > > For bitmapped (2-level) images in the past I counted number > of pixels that differed (in 20000 by 10000 line image numerical > noise typically caused changes to few hundred or less pixels, > more meant I had to investigate the problem).
OK thanks, Its not too much of a problem at the moment as I don't change the code very frequently so its not too onerous to generate the files automatically and check them manually. If I find I'm doing updates more frequently I'll have to consider this sort of solution. The ideal solution would be to implement SPAD code to read from files back to scenegraph structure as this would be useful, other than testing. However I think this would be much more difficult than writing to files without XML libraries like DOM or SAX. Another partial option which would reduce, but not eliminate, the problem (partly implemented already in the SVG code) would be a switch in the code which quantises float to integer before writing. Martin -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
