Hide Forgot
Description of problem: Due to a bug in include/bits/stl_algo.h gcc-4.8.2 (20131017 (Red Hat 4.8.2-1)) miscompiles function "median" in octave (and probably some other numerical packages). Version-Release number of selected component (if applicable): gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC) How reproducible: 100% Steps to Reproduce: run "test median" in the octave binary compiled with 4.8.2. You will see something like: :1> test median ***** assert (median (b, 3), (y(:, :, 3, :) + y(:, :, 4, :))/2); !!!!! test failed ASSERT errors for: assert (median (b, 3),(y (:, :, 3, :) + y (:, :, 4, :)) / 2) Location | Observed | Expected | Reason (3,1,1,2) -6.741665460015373e+277 0.6608 Abs err 6.7417e+277 exceeds tol 0 (3,2,1,4) 0.7306785881519318 0.8 Abs err 0.069324 exceeds tol 0 shared variables Additional info: More on the problem with octave see: http://savannah.gnu.org/bugs/?40436 The bug has been fixed in gcc branch: http://gcc.gnu.org/viewcvs/gcc/branches/gcc-4_8-branch/libstdc%2B%2B-v3/include/bits/stl_algo.h?r1=203873&r2=203872&pathrev=203873 http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=203874 Please issue an update that includes this fix.
I'm pretty sure this is fixed in gcc-4.8.2-7.