[Shootout-list] Implicitode test

Sebastien Loisel Sebastien Loisel <sloisel@gmail.com>
Thu, 14 Apr 2005 00:31:40 +0200


> Is this a 'same way' test?  Why can't a Fortran
> programmer solve the problem using the normal Fortran
> idioms and language features?

Well, pretty much. Here's the deal.

The AD (automatic differentiation) feature was meant to be in there.
Simon's implemented it fine by defining a new type and so on, which is
the right way of doing it. It is more verbose in fortran than it is,
say, in ocaml, but fortran is a verbose language. I don't think
there's anything wrong with the fact you have to make a new type in
fortran, it's the same in all other languages.

The original intention was to test floats and doubles (and long
doubles.) Long doubles were causing so much trouble in other languages
that I dropped them. Then I was trying to reproduce the float results
in ocaml, but as you know right now we compare floating point outputs
and they have to match exactly. I wasn't able to do that with my
original implementation. That's when I moved the C++ implementation to
a "float simulation" that mirrors the ocaml.

Now that the test works, I would like to move the C++ back to floats
(and so the Fortran back to floats.) I'll have to make ocaml work with
"simulated floats" but that's the way it is.

The numerical results with floats and doubles are intended to be
significantly different, so you can't use the double computation for
the float or vice-versa.

Sebastien Loisel