-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
estimateQuadraticCurveLength test failure #41
Comments
We should probably round that result to some number of digits. These kinds of floating point differences are hard to avoid. |
Thanks for the swift reply, Just!
Great: I was going to go with that as a ‘temporary’ downstream fix. Having it as an upstream patch is even better.
So this was always a lurking bug? I'm still a bit confused about why we got 0 bug reports before this month, and at least 2 since. Like something changed, but I wouldn't know what… |
Maybe we just got lucky... A PR would be great. |
It would, but I should point out I'm just a humble distro packager. I have no idea how to round numbers in Python. I'll try looking it up, but don't expect high-quality code… |
Something in this direction should work: >>> round(estimateQuadraticCurveLength((0, 0), (50, 20), (100, 40)), 11) # collinear points
107.70329614269 |
I'm wondering if there's a difference in rounding between CPU models (on my computer, it passes):
|
And here is a failing computer, from some helpful people at #guix IRC
So perhaps an Intel / AMD difference, though not enough samples, and not that it matters I suppose. |
Hmkay, but doesn't that reduce the ‘doc-’ quality of the ‘-string’? I'm more tempted to choose some less ‘controversial’ points that produce the same result everywhere, although that might be whack-a-mole… [Edit: but if you think it doesn't, I'll happily submit a patch to that end — but then do we modify all such assertions?]
Heh, oh dear. I thought the same thing, with the same amount of samples (1 of each). Could it truly…? |
since fontTools is required anyhow these old fontPen.penTools should just mimic the fontTools callback for calculating curve length: see https://github.com/fonttools/fonttools/blob/main/Lib/fontTools/misc/bezierTools.py#L261 |
Hi! We're receiving a sudden influx of reports on the following test failure on GNU/Linux:
What's fun is it happens on some machines, and not others, and it's consistent: ‘good’ machines stay good, ‘bad’ machines remain bad.
I can't find any seemingly relevant recent changes. On a whim I tried downgrading the kernel on a ‘bad’ machine from 5.18 to 5.17, but no difference.
Thoughts? Has anybody else seen similar errors?
The text was updated successfully, but these errors were encountered: