BUG DESCRIPTION:----------------When we use sprand(m,n,density) with a specified density, we expect that the output complies -- in average -- with the given density. But it's not the case. The density of the output clearly always overflows the given one. For instance, if we specify a density=0.9, the actual one will most often be 1.00 instead (no zeros!).--> d0 = 0.9; clear d; for i=1:100, s = sprand(10,10, d0); d(i) = nnz(s)/100; end--> mean(d) ans = 0.9892--> min(d) ans = 0.96--> stdev(d) ans = 0.011693ERROR LOG:----------None. The result does not comply with the specification.HOW TO REPRODUCE THE BUG:-------------------------d0 = 0.9;clear dfor i=1:100, s = sprand(10,10, d0); d(i) = nnz(s)/100; endmean(d)min(d)stdev(d)OTHER INFORMATION:------------------Same issue with Scilab .5.2 and with Scilab 6.0.1
Designs
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.