You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sherwin Wang <sh...@db.com> on 2003/09/11 16:37:58 UTC
[math] A bug in org.apache.commons.math.stat.univariate.rank.Percentile, ver
1.5?
Hi,
Using this code, we can see the problem.
double[] d = new double[]{1, 2, 3};
Percentile p = new Percentile(75);
p.evaluate(d);
The fix seems to replace line 148 from
if (pos > n) {
to
if (pos >= n) {
Please let me know after the bug is fixed or how I can change the code.
Best regards,
Sherwin Wang
212-454-2751
Insight Project Development, Deutsche Bank
23rd West, 280 Park Av. NYC, NY 10017
--
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
RE: [math] A bug in org.apache.commons.math.stat.univariate.rank.Percentile, ver 1.5?
Posted by Brent Worden <br...@worden.org>.
I just submitted a patch that fixes this bug.
Brent Worden
http://www.brent.worden.org
> -----Original Message-----
> From: Mark R. Diggory [mailto:mdiggory@latte.harvard.edu]
> Sent: Thursday, September 11, 2003 11:02 AM
> To: Jakarta Commons Developers List
> Subject: Re: [math] A bug in
> org.apache.commons.math.stat.univariate.rank.Percentile, ver 1.5?
>
>
> Thanks Sherwin, I'm a little buisy today, but this is an easy fix and
> test to do. I'll try to look at it this evening.
>
> -Mark
>
>
> Sherwin Wang wrote:
>
> > Hi,
> >
> > Using this code, we can see the problem.
> >
> > double[] d = new double[]{1, 2, 3};
> > Percentile p = new Percentile(75);
> > p.evaluate(d);
> >
> > The fix seems to replace line 148 from
> > if (pos > n) {
> > to
> > if (pos >= n) {
> >
> > Please let me know after the bug is fixed or how I can change the code.
> >
> > Best regards,
> >
> > Sherwin Wang
> > 212-454-2751
> > Insight Project Development, Deutsche Bank
> > 23rd West, 280 Park Av. NYC, NY 10017
> >
RE: [math] A bug in org.apache.commons.math.stat.univariate.rank.Percentile, ver 1.5?
Posted by Brent Worden <br...@worden.org>.
I just submitted a patch that fixes this bug.
Brent Worden
http://www.brent.worden.org
> -----Original Message-----
> From: Mark R. Diggory [mailto:mdiggory@latte.harvard.edu]
> Sent: Thursday, September 11, 2003 11:02 AM
> To: Jakarta Commons Developers List
> Subject: Re: [math] A bug in
> org.apache.commons.math.stat.univariate.rank.Percentile, ver 1.5?
>
>
> Thanks Sherwin, I'm a little buisy today, but this is an easy fix and
> test to do. I'll try to look at it this evening.
>
> -Mark
>
>
> Sherwin Wang wrote:
>
> > Hi,
> >
> > Using this code, we can see the problem.
> >
> > double[] d = new double[]{1, 2, 3};
> > Percentile p = new Percentile(75);
> > p.evaluate(d);
> >
> > The fix seems to replace line 148 from
> > if (pos > n) {
> > to
> > if (pos >= n) {
> >
> > Please let me know after the bug is fixed or how I can change the code.
> >
> > Best regards,
> >
> > Sherwin Wang
> > 212-454-2751
> > Insight Project Development, Deutsche Bank
> > 23rd West, 280 Park Av. NYC, NY 10017
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
Re: [math] A bug in org.apache.commons.math.stat.univariate.rank.Percentile,
ver 1.5?
Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Thanks Sherwin, I'm a little buisy today, but this is an easy fix and
test to do. I'll try to look at it this evening.
-Mark
Sherwin Wang wrote:
> Hi,
>
> Using this code, we can see the problem.
>
> double[] d = new double[]{1, 2, 3};
> Percentile p = new Percentile(75);
> p.evaluate(d);
>
> The fix seems to replace line 148 from
> if (pos > n) {
> to
> if (pos >= n) {
>
> Please let me know after the bug is fixed or how I can change the code.
>
> Best regards,
>
> Sherwin Wang
> 212-454-2751
> Insight Project Development, Deutsche Bank
> 23rd West, 280 Park Av. NYC, NY 10017
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>