|
From: sfeam <sf...@us...> - 2015-10-08 04:44:09
|
In the file interpol.c is this chunk of code starting at line 1264:
%%%%
if (k) {
cp->points[j].x = x;
if ( cp->plot_smooth == SMOOTH_FREQUENCY ||
cp->plot_smooth == SMOOTH_CUMULATIVE ||
cp->plot_smooth == SMOOTH_CUMULATIVE)
k = 1;
cp->points[j].y = y /= (double) k;
%%%%
This is clearly not correct, but I cannot figure out if the
error is a duplicate test for SMOOTH_CUMULATIVE or a missing
test for SMOOTH_CUMULATIVE_NORMALISED.
The code was added in Apr 2010 as part of the new smooth option
"smooth cnormal". Because this was clearly intended as part
of the new option, my first thought is that it's a typo and
the 3rd test should be for SMOOTH_CUMULATIVE_NORMALISED.
But I cannot find any test case where the current code produces
an error, so maybe the test is not really needed at all?
Can someone figure out what the intent was, and whether there
has always been a bug in "smooth cnormal"?
Ethan
|