[PATCH 5/5] d2d1: Implement initial support for quadratic bezier outlines.

Henri Verbeet hverbeet at gmail.com
Sun May 21 16:40:43 CDT 2017


On 21 May 2017 at 20:58, Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> Henri Verbeet <hverbeet at gmail.com> wrote:
>
>> > I'd dare to claim that both variants should be equivalent in accuracy,
>> >
>> I'd be interested to see that analysis.
>
> I guess that an interested person would need to perform some elementary
> math things like opening braces and regrouping variables in an equation.
>
I was afraid that might be about the level of analysis done.
Unfortunately floating-point arithmetic doesn't work that way. I don't
care enough to do proper analysis and calculate error bounds, but
consider for example the trivial case of t = 1.0f, in which case

    out->x = a->x + (b->x - a->x) * t;

would be equivalent to

    out->x = a->x + (b->x - a->x);

then, note that "a ⊕ (b ⊖ a)" isn't necessarily equal to a.

Of course plenty has been written on the subject of floating point
computation, but some classical introductions are section 4.2 of TAoCP
(volume 2) by Knuth, and the 1991 paper by David Goldberg.



More information about the wine-devel mailing list