From mboxrd@z Thu Jan 1 00:00:00 1970 From: jtc@redback.com (J.T. Conklin) To: gdb-patches@cygnus.com Cc: phdm@macqel.be, gdb@cygnus.com Subject: Re: testsuite/print_long_arg_list Date: Thu, 08 Apr 1999 15:28:00 -0000 Message-id: <5mg16aycjf.fsf@jtc.redbacknetworks.com> References: <199904082043.NAA29533@andros.cygnus.com> X-SW-Source: 1999-q2/msg00007.html >>>>> "Stan" == Stan Shebs writes: Stan> I'm no floating-point expert, but I do know that you're supposed Stan> to be careful about ignoring the last digit. On the other hand, Stan> GDB just uses a printf %g to display float values, so the output Stan> is going to depend on the system's C library as much as GDB's Stan> correctness. In fact, "a" is actually 22.22 in the sources, so Stan> even the expected test result isn't what it should be. Stan> My inclination is to relax the match here. What does everybody Stan> else think? Isn't the problem that 22.22 cannot be represented exactly in binary floating point, thus is subject to various rounding issues in the least significant digits? Perhaps using values like 22.5, 22.25, 22.125, etc. would eliminate these problems. --jtc -- J.T. Conklin RedBack Networks