<div dir="ltr"><div>OK. Thanks you. Found it.<br></div><div>In base to the code is feasible in a couple of weeks.</div><div>I-ll implement a second order kahan algorithm. Third order would be overkill ( I don't think anyone is gonna use it for high precision calculus  ).</div><div>But it's not only sum and average, variance (stats) and any other formula with sums is affected. That's why I need time to track it.<br></div><div>And by the way, what about using long double for intermediate steps, to improve precision. For what I know glibc or whatever uses gcc on fedora uses it, or at least exp((double)10) returns the same as exp((long double)10. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mié, 9 dic 2020 a las 23:00, Eike Rathke (<<a href="mailto:erack@redhat.com">erack@redhat.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On Wednesday, 2020-12-09 20:25:17 +0100, Dante Doménech wrote:<br>
<br>
> Does anyone know where are implemented the calc formulas?<br>
<br>
Regina already gave pointers. Ask if you need more.<br>
<br>
> I'd like to check out if it uses the kahan algorithm, pairwise sum or<br>
> something else.<br>
<br>
Kahan is not used, but there's<br>
<a href="https://bugs.documentfoundation.org/show_bug.cgi?id=137679" rel="noreferrer" target="_blank">https://bugs.documentfoundation.org/show_bug.cgi?id=137679</a><br>
to implement it. I thought Roman would start on that but maybe<br>
I misunderstood. So if you'd like to tackle that you're welcome.<br>
<br>
The current approach is quite simple, it just remembers one value to add<br>
that later.<br>
<br>
  Eike<br>
<br>
-- <br>
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A<br>
</blockquote></div>