Skip to content

math.log domain error #128

Open
Open
@bencrts

Description

@bencrts

For the following params:

param = LWE.Parameters(
     n = 2**17, #32768
     q = 2**(3522),
     Xs = ND.Uniform(-1, 1),
     Xe = ND.DiscreteGaussian(3.19),
     m = oo
)

est = LWE.primal_bdd(param, red_cost_model = RC.MATZOV)

there is an error thrown by math.log():

[...]
~/Desktop/TBA/Github/lattice-estimator/estimator/lwe_primal.py in svp_dimension(cls, r, D)
    300
    301         d = len(r)
--> 302         r = [log(x) for x in r]
    303
    304         if d > 4096:

~/Desktop/TBA/Github/lattice-estimator/estimator/lwe_primal.py in <listcomp>(.0)
    300
    301         d = len(r)
--> 302         r = [log(x) for x in r]
    303
    304         if d > 4096:

ValueError: math domain error

this is caused by the math.log() function throwing a domain error for very small inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions