[GiNaC-devel] sporadic make check failure in exam_inifcns_nstdsums
Richard B. Kreckel
kreckel at in.terlu.de
Sat Jan 15 00:47:14 CET 2022
Dear Stefan,
On 15.01.22 00:28, Stefan Weinzierl wrote:
> currently prec is set to 5 * pow(10, -Digits) in inifcns_test_HLi,
> but this is just some empirical value, which seemed to work fine in the
> last 15 years.
>
> We expect the two values for (H(lst{-2,1,3},numeric(245)/100) to differ
> in the last digits, the main reason being a loss of significant digits
> when subtracting two almost equal numbers.
> We are not doing interval arithmetic, so we have to live with this fact.
>
> Your explanation why this even happens on the same machine seems
> convincing.
>
> Clearly the testsuite should pass in 100% of the cases, not just in 98.4%.
> Therefore raising prec to 10 * pow(10, -Digits) or 20 * pow(10, -Digits)
> in inifcns_test_HLi is fine.
>
> One may discuss if one raises prec just in inifcns_test_HLi, or also in
> other places (like exam_inifcns_elliptic.cpp). I have a slight
> preference for just adjusting it in inifcns_test_HLi.
> If you prefer not to be bothered again in a few years with the same
> issue in other places, we may raise it in all places where we used
> similar constructions.
Given the rapid decline of larger differences between H and Li as is
apparent from the histogram, I would say that setting the precision to
10*pow(10, -Digits) in inifcns_test_HLi() seems very safe.
But it's entirely your decision!
All my best,
-richy.
--
Richard B. Kreckel
<https://in.terlu.de/~kreckel/>
More information about the GiNaC-devel
mailing list