[Shootout-list] What people say about shootout (correct answers)

Sebastien Loisel Sebastien Loisel <sloisel@gmail.com>
Mon, 2 May 2005 13:25:36 +0200


> however, i still think that the observable result for a shootout
> benchmark should be the same for all languages. ie,
>=20
>         | A - C | < epsilon

I wanted to do this at first but you can achieve the same effect by
truncating the output, if you're lucky. But you can cook up your own
luck:

If the correct answer is 3.14159265354 and you want epsilon=3D~0.001 you
would be tempted to write 3.142 except that if another program makes
an error of -0.000093 it'll show the wrong digit. So to make your own
luck, you either twiddle it so that epsilon=3D~0.0001 and show four
digits, or keep ~0.001 but make the correct answer 6.2831853072.

Sebastien Loisel