[cfp-interest 4004] Re: Rounding error in fma(r, s, t) - Not for inclusion in our Meetings
Paul Zimmermann
Paul.Zimmermann at inria.fr
Tue Sep 8 22:38:49 PDT 2026
Hi Damian,
please can you be more specific?
You have u = r*s+t+eps1, then v := fma(r,s,u) = r*s+u+eps2,
and w := o(v-t) = v-t+eps3, where eps1, eps2, eps3 are the rounding errors.
This yields w = 2*r*s+eps1+eps2+eps3.
What is your exact statement in terms of w?
Should it be v = fma(r,s,-u) instead?
Do you consider rounding to nearest only?
Paul
> Date: Wed, 9 Sep 2026 09:50:03 +1000 (AEST)
> From: Damian McGuckin <damianm at esi.com.au>
>
>
> Thought I would tap into collective intelligence.
>
> Give a computation with p = precision (24 for float, 53 for double)
>
> u = fma(r, s, t)
>
> where
> 0.5 <= r <= 1 or strictly [0.5, 0.617..., 0.731..., 1]
>
> and
> 2**(1-p) < s < 1 (I can limit the upper bound to 0.25)
> and
> 2**(-p-2) < |t| < 2**(-p-1)
>
> why does
>
> fma(r, s, u) - t
>
> seem to yield the rounding error even when |t| > |r * s|
>
> If you look at the requirements under which Kahan's Fast Two Sum works,
> that formula will work for
>
> |t| <= |r * s|
>
> But it seems to work for my data when that inequality does not hold and I
> am looking for a way to prove it (I have tested even 32-bit floating point
> value in the range is 's' and it seems to but that doesn't prove it for
> all possible double values).
>
> Not urgent - Thanks - Damian
> _______________________________________________
> cfp-interest mailing list
> cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>
More information about the cfp-interest
mailing list