This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: real.c fails floating point tests
- From: Stephen L Moshier <steve at moshier dot net>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Robert Dewar <dewar at gnat dot com>, <gdr at integrable-solutions dot net>, <gcc at gcc dot gnu dot org>
- Date: Wed, 16 Oct 2002 13:36:52 -0400 (EDT)
- Subject: Re: real.c fails floating point tests
On Wed, 16 Oct 2002, Andrew Haley wrote:
> Robert Dewar writes:
> >
> > Stephen, how easy would it be to install the paranoia test in an easily
> > reusable form, so that this test can be run periodically?
>
> It's already been done, in contrib/paranoia.cc.
By way of warning, this does not seem entirely as advertised.
contrib/paranoia.cc is not testing the internal real.c arithmetic.
Also it is otherwise incomplete as it stands. For example, it is
using the host computer's math library for the log, exp, pow
functions. That defeats many of the paranoia tests. The reported
abort was in pow2test, involving an arithmetic bug stimulated by the
pow function written in real.c's arithmetic. So paranoia.cc is a
weakened test; it needs some more work to finish it, and it should
also test the internal arithmetic (the functions now called do_add,
do_divide, etc. in real.c).
I used to keep a functional test harness for real.c and various tests
for it (including paranoia and a C++ class to overload arithmetic
calls) but lost track when the gcc development moved to Cygnus.
Adapting and updating for the many gcc changes since then is not
something I have free time for at present. The decimal to binary
conversion is the only item there that I need as a user, in self
defense, to have working, and what little time I do have for this now
is concentrated on that.
Sorry, but I do not have time either to get into a flame war.
I am not a software prima donna, I am just an irate customer.