[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libcifpp, libpdb-redo, density-fitness



Hi Étienne,

Thanks for your suggestion, I might use this in a future project.

For now I found that I made an error in the test. I'm using Boost testing framework and using this you can specify the tolerance, but it was ignored. Eventually I found out that I specified the tolerance as a double and then compared two floats. That's not going to work. After specifying the tolerance as a float, the unit-test ran without problems.

regards, -maarten

Op 04-01-2021 om 19:23 schreef Étienne Mollier:
Hi Maarten,

Maarten L. Hekkelman, on 2021-01-04 11:14:44 +0100:
The reason for i386 is that the tolerance for floating comparison in the
test code is too strict (i386 being 32bit has a different double outcome for
some calculations). That is something I need to fix in the testing code.
If that helps, I tried a trick I shamelessly stole from Adrian
Bunk, which seems to address the tolerance issue without an
entire review of the test suite.  You could give a go to the
following snippet on top of your debian/rules, should you need
to buy yourself some time:

ifneq (,$(filter i386 m68k,$(DEB_BUILD_ARCH)))
export DEB_CFLAGS_MAINT_APPEND=-ffloat-store
export DEB_CXXFLAGS_MAINT_APPEND=-ffloat-store
endif

This works on m68k too, if I trust the GCC manual.  I haven't
checked closely, but I believe it may sacrifice performances on
these platforms though.

Kind Regards,

--
Maarten L. Hekkelman
http://www.hekkelman.com/


Reply to: