QtTestLib update

Michael Pyne pynm0001 at comcast.net
Fri Sep 16 23:22:01 BST 2005


On Friday 16 September 2005 06:58, Brad Hards wrote:
> On Friday 16 September 2005 18:52 pm, Hans Meine wrote:
> > On Wednesday 14 September 2005 22:51, André Wöbbeking wrote:
> > > > > 2) add a COMPARE for floating point numbers where I can set the
> > > > > epsilon.
> > > >
> > > > Does QCOMPARE_EPSILON sound good?
> > >
> > > Boost uses BOOST_CHECK_CLOSE, not sure which is more expressive.
> >
> > I like QCOMPARE_EPSILON more, it's more descriptive and thus easier to
> > remember from my POV.
>
> COMPARE_EPSILON or QCOMPARE_EPSILON sounds like it would compare epsilons.
> If you want a COMPARE for pair of floats/doubles, why not call it
> COMPARE_FLOAT or FLOAT_COMPARE?

Well I think they're talking about ensuring that the absolute difference 
between two floats is within a certain value (the epsilon).

I don't understand why it's called BOOST_CHECK_CLOSE for that reason, and 
COMPARE_FLOAT doesn't sound descriptive enough.  But epsilon is more of a 
computer science term and may be unclear to new programmers.  I still like 
epsilon better though.

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050916/2df67524/attachment.sig>


More information about the kde-core-devel mailing list