On Fri, 12 Nov 2021 19:09:18 GMT, Laurent Bourgès <lbour...@openjdk.org> wrote:
>> I just pushed a commit ( 40bda06 ) that addresses the machine error problem >> to my satisfaction. It includes a unit test that failed before that commit >> and now passes. >> >> At your convenience let me know your thoughts. (That commit continues to >> focus on very small doubles; it may (?) need help to address very large >> double errors.) > > That looks interesting as the new margin looks like ulp(x - bbox), however it > may be not enough as the position error depends on curve polynom coefficients > (magnitude). > > I derived your (yesterday) test to play with the margin and try small to huge > curves. > I found the condition number ~ sum (abs(coeffs)) so margin = math.ulp(cond). > But sometimes the quad solver is giving t with few ulps error that cause high > position shifts. > > I will go on testing your last approach and share my experiments As this accuracy problem is a more general issue on quad / cubic curves, I created the Marlin-Math project to ascertain the math function accuracy. See https://github.com/bourgesl/marlin-math/blob/main/src/main/java/test/FindExtremaAccuracyTest.java I will propose a new upper margin value that quarantees the edge condition. ------------- PR: https://git.openjdk.java.net/jdk/pull/6227