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

Cast DiscreteGaussian args to RR #133

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Cast DiscreteGaussian args to RR #133

merged 2 commits into from
Oct 29, 2024

Conversation

ludopulles
Copy link
Contributor

@ludopulles ludopulles commented Oct 29, 2024

Currently

params = LWE.Parameters(n=1024, q=257, Xs=ND.Ternary, Xe=ND.DiscreteGaussian(8/sqrt(2*pi)))
LWE.primal_usvp(params)

outputs rop: ≈2^42.4, red: ≈2^42.4, δ: 1.012950, β: 40, d: 665, tag: usvp.
This PR will output rop: ≈2^424.2, red: ≈2^424.2, δ: 1.001567, β: 1413, d: 1621, tag: usvp.

While I refactored NoiseDistribution, I forgot to cast stddev and mean to RR. Oops!

Also: output sparse ternaries as T(p=p, m=m[, n=n]) because we can?

Root cause of the issue: if stddev or mean is not a float type, the PrimalUSVP code cost_gsa checks a predicate lhs <= rhs which is now a Symbolic Expression, causing weird behaviour.

@malb malb merged commit 848cc1e into malb:main Oct 29, 2024
2 checks passed
@malb
Copy link
Owner

malb commented Oct 29, 2024

Ta!

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.

2 participants