On Wed, 10 Nov 2021 10:23:53 GMT, Laurent Bourgès <lbour...@openjdk.org> wrote:
>> I agree it is out of the scope of this issue to implement high-precision >> polynom evaluation (compensated horder scheme), that I or anybody else could >> implement it later. >> To ensure bounds2D are enclosing the shape entirely, I propose to add a >> small margin (10 ulps or more) to ascertain precision is good enough. >> To determine the precision level, using fuzzy testing is the good approach : >> generate lots ofrandom paths => check bounds2D accuracy in ulp units. > > @prrace @mrserb what do you think on this bug in terms of precision > requirements? > - should bbox always include control points ? > - should ideal shape always fit in bbox ? So I propose to add a margin > > numerical inaccuracies. > > I can develop a numerical approach based on fuzzy testing: > - generate random curves (high magnitude changes on control points) > - use both this algorithm (double) and implement the same with BigDecimal > - estimate the extrema error = max distance(pts big decimal, pts double) Ideally jdk could provide new math methods: - evalPoly(eqn[]) - find roots... Based on compensated horner scheme and Math.fma() ~ 0.5 ulp ------------- PR: https://git.openjdk.java.net/jdk/pull/6227