Re: Automatic testing of numerical output



Neilen Marais wrote:
Hi!

I'm trying to set up some tests for a f90 code that I am working on.
I'd like to compare the results of known test-problems across
different versions and platforms. The code generates output in text
files.

Since floating point results tend not to match exactly, I can't
just diff output files to see what's going on. Software that will
compare floating point numbers to a specified tolerance level would be
quite useful.

Do generally applicable software exist to set up such tests, or do
people just roll their own? I'm quite interested to hear how other
people approach this presumably common problem.


The Polyhedron Benchmarks (see our web site) includes a program called PBValid that does that sort of comparison. I use it to confirm that the output from executables produced by different compilers is within specified tolerances. It deals with fuzziness from variation in both floating point arithmetic and formatted output.



-- John Appleyard - (send email to john!news@.. rather than spamtrap@..) Polyhedron Software Programs for Programmers - QA, Compilers, Graphics, Consultancy ********* Visit our Web site on http://www.polyhedron.co.uk/ ********* .



Relevant Pages

  • Re: a LISP raytracer
    ... >> Optimisation and type inference is a real weak point of CMUCL and SBCL ... Compared to other Lisp compilers, ... > is hard to compare. ...
    (comp.graphics.rendering.raytracing)
  • Re: a LISP raytracer
    ... >>> Optimisation and type inference is a real weak point of CMUCL and SBCL ... >>> compared compilers for other languages, like Stalin, MLton and ocamlopt. ... >> is hard to compare. ... GCs in commercial Lisp tend to be optimized ...
    (comp.graphics.rendering.raytracing)
  • Re: Comparing floating point values in Java
    ... when comparing floating point values in computers. ... In Java, will unchanged values compare strictly true if equal? ... In strictfp mode, the exact, bit-by-bit, result is predictable from the ...
    (comp.lang.java.programmer)
  • Re: Comparing floating point values in Java
    ... when comparing floating point values in computers. ... In Java, will unchanged values compare strictly true if equal? ... In strictfp mode, the exact, bit-by-bit, result is predictable from the ...
    (comp.lang.java.programmer)
  • Re: addition of 0.7 and 0.1 is not 0.8 CDbl / CStr vbs problem
    ... Comparing floating point values should be done using a tolerance:- ... In other cases the resulting 'near enough' value stored after a calculation ... the situation using CDbl) than to compare with "almost near ... CStr may no longer be what you want. ...
    (microsoft.public.scripting.vbscript)