Skip to content

fix(log): bypass ValueError - #129

Open
bencrts wants to merge 2 commits into
mainfrom
log-fix
Open

fix(log): bypass ValueError #129
bencrts wants to merge 2 commits into
mainfrom
log-fix

Conversation

@bencrts

@bencrts bencrts commented Sep 24, 2024

Copy link
Copy Markdown
Collaborator

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

bencrts commented Sep 24, 2024

Copy link
Copy Markdown
Collaborator Author

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

bencrts commented Sep 24, 2024

Copy link
Copy Markdown
Collaborator Author

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

malb commented Sep 30, 2024

Copy link
Copy Markdown
Owner

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

@bencrts

bencrts commented Oct 8, 2024

Copy link
Copy Markdown
Collaborator Author

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