[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] numeric_io_traits problem under Valgrind
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] numeric_io_traits problem under Valgrind |
Date: |
Tue, 27 Feb 2018 16:54:29 +0100 |
On Tue, 27 Feb 2018 02:44:15 +0000 Greg Chicares <address@hidden> wrote:
GC> On 2018-02-27 02:07, Vadim Zeitlin wrote:
GC> [...]
GC> > http://www.network-theory.co.uk/docs/valgrind/valgrind_27.html
GC> >
GC> > > As of version 3.0.0, Valgrind has the following limitations in
GC> > > its implementation of x86/AMD64 floating point relative to
GC> > > IEEE754. Precision: There is no support for 80 bit arithmetic.
GC> [...snip their bloviation...]
GC> >
GC> > So this looks like a direct consequence of limitations in the current
GC> > Valgrind FP support implementation, because log10l() of the number above
is
GC> > very close to 1e-16 and the loss/extra precision makes it go just
GC> > above/below it.
GC>
GC> If there's some valgrind-is-being-used macro, we'll just use it
GC> to conditionalize the test.
Yes, this can indeed be done, and thanks to C++17 __has_include, we can
even do it without changing anything at the build system level. The result
is still a bit ugly, but not as bad as it could have been, please see
https://github.com/vadz/lmi/pull/72
Thanks,
VZ