On Wed, 10 Nov 2021 10:25:55 GMT, Laurent Bourgès <lbour...@openjdk.org> wrote:
>> @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 I attempted to explore a numerical approach to pad the bounding box here 4b9d87d6d03e923bb2663fc8f4f77b7549df6e70 ... but I don't like the results so far. Any suggestions? (Or if you have a better approach in mind we can discard that entire class...) ------------- PR: https://git.openjdk.java.net/jdk/pull/6227