octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40436] median no longer passes make check


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #40436] median no longer passes make check
Date: Sat, 02 Nov 2013 23:15:17 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36

Follow-up Comment #26, bug #40436 (project octave):

I've traced this down to liboctave Array::nth_element, here's an example using
the call to nth_element that the failing median test case makes. It does look
like uninitialized memory, because it's random which element of this result is
wrong, and it doesn't happen for me every time.


octave-cli:1> b = rand (3, 4, 6, 5);
octave-cli:2> tmp = nth_element (b, 3:4, 3)
tmp =

ans(:,:,1,1) =

   0.72585   0.35493   0.89880   0.37920
   0.75690   0.62664   0.54848   0.12803
   0.38214   0.57314   0.23438   0.86337

ans(:,:,2,1) =

   0.90676   0.63536   0.92257   0.53978
   0.79579   0.73971   0.73077   0.68045
   0.67474   0.64598   0.59156   0.95027

ans(:,:,1,2) =

  -1.4411e+296    2.5586e-01    4.0583e-01    3.5271e-01
    4.8441e-01    3.8306e-01    4.3900e-01    2.4635e-01
    3.7203e-01    3.5613e-01    6.8720e-01  -7.4608e+232

ans(:,:,2,2) =

  -3.2079e+176    2.5827e-01    5.8781e-01    6.4392e-01
    6.6424e-01    5.7252e-01    5.2495e-01    3.6968e-01
    5.1522e-01    4.7913e-01    8.9407e-01  -1.3622e-138

ans(:,:,1,3) =

   0.46609   0.48197   0.47079   0.35431
   0.36301   0.31437   0.54804   0.62638
   0.40946   0.48275   0.61334   0.19517

ans(:,:,2,3) =

   0.70109   0.56286   0.69651   0.44498
   0.54481   0.39687   0.65335   0.75202
   0.83503   0.61924   0.90139   0.72982

ans(:,:,1,4) =

   0.51566   0.17927   0.60041   0.44344
   0.56499   0.00000   0.50164   0.21559
   0.21606   0.26750   0.39789   0.49834

ans(:,:,2,4) =

   0.55074   0.18725   0.61739   0.61690
   0.56823   0.00000   0.86750   0.34780
   0.34628   0.39065   0.41223   0.54986

ans(:,:,1,5) =

   0.22879   0.11877   0.34887   0.64783
   0.50557   0.43964   0.00000   0.44355
   0.59332   0.67293   0.55430   0.36468

ans(:,:,2,5) =

   0.56224   0.54101   0.51298   0.68682
   0.57307   0.51974   0.21241   0.61531
   0.59603   0.74638   0.82469   0.50562



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40436>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]