-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bounds of eta in blog post #1
Comments
Thanks a lot for your attention! You may be right that lesser If you follow that route, then and what we are hoping to have is for Another difference is that I used a slightly different formula to take account of rounding. This stuff is explained in the section on rounding. But that's unlikely a big deal, as it usually just shifts Also, even if By the way, the source code for doing this stuff is here, if you want to check it out. |
Ah, sorry, please ignore the previous comment. Since the then fails to hold for I will look into the source code later today. |
Yeah, looks like the crucial part I've missed is that it is not enough for the interval to have length at least |
You mean, since |
Yes, exactly. Regarding my previous message:
It turns out that 192 bits are indeed not enough for all of the pairs with the current approach (for instance, for And I have yet another question. There is a comment here regarding the second segment. I understand why it cannot be moved and can overlap with the first one (since otherwise we would have defeated the optimization of storing |
I'm assuming you're talking about the case
What I mean is that (1) we don't want those leading zeros to be printed, and (2) especially on an invalid buffer region, possibly pointing before the start of the buffer. As a result, we need to find a position in the middle of the second segment where we can start printing digits, which might be right after the end of the first segment (which I believe is what my implementation is doing) or it still might have some overlap with the first segment, but is guaranteed to be safe to write, and we should anyway know how many digits are overlapping.
It seems that it requires the table size to be doubled, for most of the choice of |
I'm trying to recreate lookup tables for the algorithm, and it seems like the first thing to do is to calculate Q for all of the$(e, k)$ pairs. I wrote the following script to do so. The problem is that it returns smaller values for $Q$ than the ones mentioned in your blog post. For example, it returns $Q=110$ for $\eta=1$ and, what is more interesting, $Q = 183$ for $\eta = 23$ .
get_bounds
function, which is responsible for finding best rational approximations, seems to pass stress testing (see lines 77-90), so I'm fairly certain that it works. However, I'm clueless how to debug this further, since I haven't found code which calculates original values in the repo.I know that this issue looks like "please, debug my random piece of code", so feel free not to help me and close the issue :)
The text was updated successfully, but these errors were encountered: