#15915: add discrete Gaussian samplers to Sage
-------------------------------------------------+-------------------------
       Reporter:  malb                           |        Owner:
           Type:  enhancement                    |       Status:  new
       Priority:  major                          |    Milestone:  sage-6.3
      Component:  statistics                     |   Resolution:
       Keywords:  sd59                           |    Merged in:
        Authors:  Martin Albrecht                |    Reviewers:  Julian
Report Upstream:  N/A                            |  Rueth
         Branch:                                 |  Work issues:
  025ac61297d755d7a0fa3d3d8085e21d2f07dd1a       |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------
Changes (by vbraun):

 * status:  closed => new
 * commit:  025ac61297d755d7a0fa3d3d8085e21d2f07dd1a =>
 * resolution:  fixed =>


Comment:

 Various builbots report:
 {{{
 sage -t --long src/sage/stats/distributions/discrete_gaussian_integer.pyx
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_integer.pyx", line
 263, in
 
sage.stats.distributions.discrete_gaussian_integer.DiscreteGaussianIntegerSampler.__init__
 Failed example:
     min(l), max(l), abs(mean(l)-2.5) < 0.01
 Expected:
     (-2, 7, True)
 Got:
     (-3, 7, True)
 }}}
 Also, on 32-bit linux:
 {{{

 sage -t --long src/sage/stats/distributions/discrete_gaussian_integer.pyx
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_integer.pyx", line
 38, in sage.stats.distributions.discrete_gaussian_integer
 Failed example:
     x=0; l.count(x), ZZ(round(n*exp(-x^2/(2*sigma^2))/norm_factor))
 Expected:
     (13350, 13298)
 Got:
     (13355, 13298)
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_integer.pyx", line
 40, in sage.stats.distributions.discrete_gaussian_integer
 Failed example:
     x=4; l.count(x), ZZ(round(n*exp(-x^2/(2*sigma^2))/norm_factor))
 Expected:
     (5543, 5467)
 Got:
     (5479, 5467)
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_integer.pyx", line
 42, in sage.stats.distributions.discrete_gaussian_integer
 Failed example:
     x=-10; l.count(x), ZZ(round(n*exp(-x^2/(2*sigma^2))/norm_factor))
 Expected:
     (46, 51)
 Got:
     (53, 51)
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_integer.pyx", line
 68, in sage.stats.distributions.discrete_gaussian_integer
 Failed example:
     mean(l).n() # long time
 Expected:
     0.48678000000...
 Got:
     0.486650000000000
 **********************************************************************
 1 item had failures:
    4 of  21 in sage.stats.distributions.discrete_gaussian_integer
     [88 tests, 4 failures, 7.06 s]
 sage -t --long src/sage/schemes/toric/variety.py
     [499 tests, 9.23 s]
 sage -t --long
 src/sage/stats/distributions/discrete_gaussian_polynomial.py
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_polynomial.py", line
 70, in
 
sage.stats.distributions.discrete_gaussian_polynomial.DiscreteGaussianPolynomialSampler
 Failed example:
     [gs() for _ in xrange(3)]
 Expected:
     [4*x^7 + 4*x^6 - 2*x^5 + x^4 + 4*x^2 - 2*x + 7, 5*x^7 - 4*x^6 + 3*x^4
 - 4*x^3 + x^2 - 4, 2*x^7 + 2*x^6 + x^5 + 2*x^3 - 3*x^2 + x]
 Got:
     [4*x^7 + 4*x^6 - 4*x^5 + 2*x^4 + x^3 - 4*x + 7, -5*x^6 + 4*x^5 - 3*x^3
 + 4*x^2 + x, 2*x^7 + 2*x^6 + 2*x^5 - x^4 - 2*x^2 + 3*x + 1]
 **********************************************************************
 File "src/sage/stats/distributions/discrete_gaussian_polynomial.py", line
 97, in
 
sage.stats.distributions.discrete_gaussian_polynomial.DiscreteGaussianPolynomialSampler.__init__
 Failed example:
     [gs() for _ in xrange(3)]
 Expected:
     [4*x^7 + 4*x^6 - 2*x^5 + x^4 + 4*x^2 - 2*x + 7, 5*x^7 - 4*x^6 + 3*x^4
 - 4*x^3 + x^2 - 4, 2*x^7 + 2*x^6 + x^5 + 2*x^3 - 3*x^2 + x]
 Got:
     [4*x^7 + 4*x^6 - 4*x^5 + 2*x^4 + x^3 - 4*x + 7, -5*x^6 + 4*x^5 - 3*x^3
 + 4*x^2 + x, 2*x^7 + 2*x^6 + 2*x^5 - x^4 - 2*x^2 + 3*x + 1]
 **********************************************************************
 2 items had failures:
    1 of   5 in
 
sage.stats.distributions.discrete_gaussian_polynomial.DiscreteGaussianPolynomialSampler
    1 of   5 in
 
sage.stats.distributions.discrete_gaussian_polynomial.DiscreteGaussianPolynomialSampler.__init__
     [18 tests, 2 failures, 0.76 s]
 }}}
 Also some crypto stuff failed, though I don't know if it is related
 {{{
 4 items had failures:
    4 of  15 in sage.crypto.lwe
    1 of   7 in sage.crypto.lwe.RingLWE.__call__
    2 of   7 in sage.crypto.lwe.balance_sample
    3 of   7 in sage.crypto.lwe.samples
     [100 tests, 10 failures, 0.60 s]
 }}}
 See
 
http://build.sagemath.org/sage/builders/%20%20fast%20Oxford%20arando%20%28Ubuntu%2013.04%20i686%29%20incremental/builds/172/steps/shell_4/logs/stdio

--
Ticket URL: <http://trac.sagemath.org/ticket/15915#comment:44>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to