summaryrefslogtreecommitdiff
path: root/debian/patches/binomial-dist-median.patch
blob: 89477bef1ce7d7a10290e4c061d08be4c2584cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Drop test for median value of the binomial distribution
 One of the BISTs in file BinomialDistribution.m hit a corner case.
 Indeed, the median value of a binomial distribution for n = 5 and p =
 0.5 is not unique and the BIST produces different values on i386 and
 amd64 architectures (2 and 3, respectively). Hence, the package FTBFS
 on i386 without this patch.
Author: Rafael Laboissière <rafael@debian.org>
Bug: https://github.com/gnu-octave/statistics/issues/140
Forwarded: not-needed
Last-Update: 2024-03-10

--- octave-statistics-1.6.5.orig/inst/dist_obj/BinomialDistribution.m
+++ octave-statistics-1.6.5/inst/dist_obj/BinomialDistribution.m
@@ -662,7 +662,7 @@ endfunction
 #%!assert (iqr (t), 1);
 %!assert (mean (pd), 2.5, 1e-10);
 #%!assert (mean (t), 2.8, 1e-10);
-%!assert (median (pd), 3);
+#%!assert (median (pd), 3);
 #%!assert (median (t), 3);
 %!assert (pdf (pd, [0:5]), [0.0312, 0.1562, 0.3125, 0.3125, 0.1562, 0.0312], 1e-4);
 #%!assert (pdf (t, [0:5]), [0, 0, 0.4, 0.4, 0.2, 0], 1e-4);