Skip to content

Precision optimization machinery#142

Open
pavpanchekha wants to merge 3 commits intomainfrom
optimal-precision
Open

Precision optimization machinery#142
pavpanchekha wants to merge 3 commits intomainfrom
optimal-precision

Conversation

@pavpanchekha
Copy link
Contributor

I've had this idea for a while—we should use binary search to compute an optimal precision allocation that we can compare Rival to. That code is in this PR; it's AI-written but I did manually refactor everything. There's also an infra/optimize.rkt script that does the optimal precision allocation for every single point in the points.json file, in an attempt to find the ones that can be improved.

So far, looking at the results, I've learned:

  • In quite a number of cases, adjusting after the final iteration doesn't work; I wonder why, we should fix this
  • Our initial precision allocations are often too high; I don't think that's super interesting so I'd like to filter it out
  • When the output underflows, Rival attempts to compute ~53 bits of the output but it actually only needs to bound the exponent, and in this case over-estimates

Excited to see what else happens!

@pavpanchekha
Copy link
Contributor Author

So—the issue with this PR, the reason I don't quite just want to merge it, is that it doesn't take into account the double-rounding machinery, which turns out to have a pretty big impact on things. Correspondingly I'm not sure if there's a bug of some kind or something, because that should actually only come up pretty rarely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant