Tests and software process
andreas.raab at gmx.de
Thu Nov 2 07:30:17 UTC 2006
Hans-Martin Mosner wrote:
> Andreas Raab schrieb:
>> I wrote those tests to make sure we have consistent (bit-identical)
>> results for various floating point functions across different Croquet
>> VMs. How these tests ended up in 3.9 I have no idea - they are part of
>> Croquet, for sure, and in the context of Croquet they make perfect
>> sense (and they pass if you use a Croquet VM and they fail if you
>> don't - which is exactly what they should do).
> That's good. Just out of curiosity: Does the FloatMathPlugin used in
> Croquet fail on any invalid inputs (e.g. numbers outside the range -1..1
> for arcCos) or does it return NaN? I'd guess it returns NaN because
> otherwise some of the tests could not possibly succeed.
Actually, this also not the latest version of these tests. In Croquet we
use the CroquetVMTests suite which includes these and other tests. And
yes, the plugin fails (I added that when noticing that -thanks to
IEEE754- different platforms would report different bit-patterns for
NaN; all in compliance with the spec!) and the exception is handled by
simply resuming with NaN so that the test can successfully complete.
>> To me, it points out more a problem with the selection of code being
>> put into the base image rather than any failing of the test itself.
>> The test is meaningful in the context it was designed for.
> Agreed. As far as I remember, the FloatMathPlugin for Croquet uses a
> software implementation for some operations to achieve the goal of
> bit-identical computation on all platforms. This probably means that the
> functions are quite a bit slower, so including this in an environment
> where the requirement is not present does not make much sense.
> So removing these tests from the general Squeak image seems like the
> reasonable thing to do, right?
Yes. (although it's not as slow as one may think as long as you can use
a "native" sqrt instruction which is fortunately the _one_ insn that the
FPUs seem to agree upon)
> BTW, I will try to run the tests with a Croquet VM soo, so then I will
> know the answer to my first question :-)
Run the CroquetVMTests instead. Those are really the relevants ones.
More information about the Squeak-dev