Skip to content
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

fix(log): bypass ValueError #129

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix(log): bypass ValueError #129

wants to merge 2 commits into from

Conversation

bencrts
Copy link
Collaborator

@bencrts bencrts commented Sep 24, 2024

Fixes #128

The sage.all.log() function does not throw the same error found in math.log(), so can be used as a bypass. However, it's much slower (~50x in some cases) so I did not just directly swap it out.

It's a bit unsatisfactory, though, but it works.

@bencrts
Copy link
Collaborator Author

bencrts commented Sep 24, 2024

After the fix:

sage: est = LWE.primal_bdd(param, red_cost_model = classic_model)
sage: est
rop: ≈2^135.2, red: ≈2^127.9, svp: ≈2^135.2, β: 317, η: 408, d: 261595, tag: bdd

@bencrts
Copy link
Collaborator Author

bencrts commented Sep 24, 2024

If there's any suggestion on a better way to handle it, let me know

@bencrts bencrts changed the title fix(log): bypass error in a silly way fix(log): bypass ValueError Sep 24, 2024
@malb
Copy link
Owner

malb commented Sep 30, 2024

Is the consensus we should merge this or is there another way?

@bencrts
Copy link
Collaborator Author

bencrts commented Oct 8, 2024

I'll have a look at @ludopulles suggestion on #128 to see if I can implement his suggested fix first.

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.

math.log domain error
2 participants