Skip to content

Fix rounding accumulation bug#521

Merged
nicoburns merged 8 commits intomainfrom
fix-rounding-accumulation-bug
Jul 23, 2023
Merged

Fix rounding accumulation bug#521
nicoburns merged 8 commits intomainfrom
fix-rounding-accumulation-bug

Conversation

@nicoburns
Copy link
Copy Markdown
Collaborator

Objective

Notes

  • This fix is a bit hacky. I think ideally we'd want to differentiate between rounded and unrounded values in the public API. But the advantage of this implementation is that it's backwards compatible and can be released as a patch to the 0.3.x series. We can of course always improve upon this in the 0.4 release.
  • It requires us to store both rounded and unrounded values, adding (I believe) 20 bytes per node. This is not ideal, but it seems like the simplest way to fix the issue. Perhaps in future we could improve upon this on future too.

Feedback wanted

General code review

@nicoburns nicoburns added the bug Something isn't working label Jul 22, 2023
@nicoburns nicoburns added this to the 0.3.13 milestone Jul 22, 2023
Copy link
Copy Markdown
Collaborator

@TimJentzsch TimJentzsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The approach looks reasonable to me, I left some comments regarding documentation.

@nicoburns nicoburns requested a review from TimJentzsch July 23, 2023 11:22
@nicoburns nicoburns merged commit 25ffaee into main Jul 23, 2023
@nicoburns nicoburns deleted the fix-rounding-accumulation-bug branch July 23, 2023 11:44
nicoburns added a commit that referenced this pull request Aug 13, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 13, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 13, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 14, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 14, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 14, 2023
(cherry picked from commit 25ffaee)
nicoburns added a commit that referenced this pull request Aug 14, 2023
(cherry picked from commit 25ffaee)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rounding errors can accumulate and cause nodes to expand each time a layout is recomputed

3 participants